From c8288c0efe5393e6bb243e0c073d603909e2102a Mon Sep 17 00:00:00 2001 From: Josh Elkins Date: Tue, 3 Dec 2024 16:53:25 -0600 Subject: [PATCH 01/19] Update codegen --- .../AWSACM/Sources/AWSACM/ACMClient.swift | 195 +++++++++++--- .../Sources/AWSACMPCA/ACMPCAClient.swift | 195 +++++++++++--- .../AWSAPIGateway/APIGatewayClient.swift | 203 +++++++++++--- .../ARCZonalShiftClient.swift | 195 +++++++++++--- .../AccessAnalyzerClient.swift | 203 +++++++++++--- .../Sources/AWSAccount/AccountClient.swift | 195 +++++++++++--- .../AWSAmp/Sources/AWSAmp/AmpClient.swift | 195 +++++++++++--- .../Sources/AWSAmplify/AmplifyClient.swift | 203 +++++++++++--- .../AmplifyBackendClient.swift | 203 +++++++++++--- .../AmplifyUIBuilderClient.swift | 203 +++++++++++--- .../ApiGatewayManagementApiClient.swift | 195 +++++++++++--- .../AWSApiGatewayV2/ApiGatewayV2Client.swift | 195 +++++++++++--- .../AWSAppConfig/AppConfigClient.swift | 203 +++++++++++--- .../AppConfigDataClient.swift | 195 +++++++++++--- .../AWSAppFabric/AppFabricClient.swift | 195 +++++++++++--- .../AppIntegrationsClient.swift | 195 +++++++++++--- .../Sources/AWSAppMesh/AppMeshClient.swift | 203 +++++++++++--- .../AWSAppRunner/AppRunnerClient.swift | 203 +++++++++++--- .../AWSAppStream/AppStreamClient.swift | 195 +++++++++++--- .../Sources/AWSAppSync/AppSyncClient.swift | 195 +++++++++++--- .../Sources/AWSAppTest/AppTestClient.swift | 195 +++++++++++--- .../Sources/AWSAppflow/AppflowClient.swift | 195 +++++++++++--- .../ApplicationAutoScalingClient.swift | 195 +++++++++++--- .../ApplicationCostProfilerClient.swift | 195 +++++++++++--- .../ApplicationDiscoveryClient.swift | 203 +++++++++++--- .../ApplicationInsightsClient.swift | 203 +++++++++++--- .../ApplicationSignalsClient.swift | 195 +++++++++++--- .../Sources/AWSArtifact/ArtifactClient.swift | 195 +++++++++++--- .../Sources/AWSAthena/AthenaClient.swift | 195 +++++++++++--- .../AWSAuditManager/AuditManagerClient.swift | 195 +++++++++++--- .../AWSAutoScaling/AutoScalingClient.swift | 195 +++++++++++--- .../AutoScalingPlansClient.swift | 195 +++++++++++--- .../AWSB2bi/Sources/AWSB2bi/B2biClient.swift | 203 +++++++++++--- .../BCMDataExportsClient.swift | 195 +++++++++++--- .../BCMPricingCalculatorClient.swift | 203 +++++++++++--- .../Sources/AWSBackup/BackupClient.swift | 203 +++++++++++--- .../BackupGatewayClient.swift | 195 +++++++++++--- .../Sources/AWSBatch/BatchClient.swift | 195 +++++++++++--- .../Sources/AWSBedrock/BedrockClient.swift | 203 +++++++++++--- .../AWSBedrockAgent/BedrockAgentClient.swift | 195 +++++++++++--- .../BedrockAgentRuntimeClient.swift | 195 +++++++++++--- .../BedrockRuntimeClient.swift | 195 +++++++++++--- .../Sources/AWSBilling/BillingClient.swift | 195 +++++++++++--- .../BillingconductorClient.swift | 203 +++++++++++--- .../Sources/AWSBraket/BraketClient.swift | 195 +++++++++++--- .../Sources/AWSBudgets/BudgetsClient.swift | 195 +++++++++++--- .../Sources/AWSChatbot/ChatbotClient.swift | 203 +++++++++++--- .../Sources/AWSChime/ChimeClient.swift | 203 +++++++++++--- .../ChimeSDKIdentityClient.swift | 203 +++++++++++--- .../ChimeSDKMediaPipelinesClient.swift | 203 +++++++++++--- .../ChimeSDKMeetingsClient.swift | 195 +++++++++++--- .../ChimeSDKMessagingClient.swift | 195 +++++++++++--- .../ChimeSDKVoiceClient.swift | 203 +++++++++++--- .../AWSCleanRooms/CleanRoomsClient.swift | 195 +++++++++++--- .../AWSCleanRoomsML/CleanRoomsMLClient.swift | 195 +++++++++++--- .../Sources/AWSCloud9/Cloud9Client.swift | 195 +++++++++++--- .../AWSCloudControl/CloudControlClient.swift | 195 +++++++++++--- .../CloudDirectoryClient.swift | 195 +++++++++++--- .../CloudFormationClient.swift | 195 +++++++++++--- .../AWSCloudFront/CloudFrontClient.swift | 203 +++++++++++--- .../CloudFrontKeyValueStoreClient.swift | 195 +++++++++++--- .../Sources/AWSCloudHSM/CloudHSMClient.swift | 195 +++++++++++--- .../AWSCloudHSMV2/CloudHSMV2Client.swift | 195 +++++++++++--- .../AWSCloudSearch/CloudSearchClient.swift | 195 +++++++++++--- .../CloudSearchDomainClient.swift | 195 +++++++++++--- .../AWSCloudTrail/CloudTrailClient.swift | 195 +++++++++++--- .../CloudTrailDataClient.swift | 195 +++++++++++--- .../AWSCloudWatch/CloudWatchClient.swift | 203 +++++++++++--- .../CloudWatchEventsClient.swift | 203 +++++++++++--- .../CloudWatchLogsClient.swift | 195 +++++++++++--- .../AWSCodeBuild/CodeBuildClient.swift | 203 +++++++++++--- .../AWSCodeCatalyst/CodeCatalystClient.swift | 203 +++++++++++--- .../AWSCodeCommit/CodeCommitClient.swift | 195 +++++++++++--- .../CodeConnectionsClient.swift | 195 +++++++++++--- .../AWSCodeDeploy/CodeDeployClient.swift | 203 +++++++++++--- .../CodeGuruProfilerClient.swift | 195 +++++++++++--- .../CodeGuruReviewerClient.swift | 195 +++++++++++--- .../CodeGuruSecurityClient.swift | 195 +++++++++++--- .../AWSCodePipeline/CodePipelineClient.swift | 203 +++++++++++--- .../CodeStarconnectionsClient.swift | 195 +++++++++++--- .../AWSCodeartifact/CodeartifactClient.swift | 203 +++++++++++--- .../CodestarnotificationsClient.swift | 195 +++++++++++--- .../CognitoIdentityClient.swift | 195 +++++++++++--- .../CognitoIdentityProviderClient.swift | 203 +++++++++++--- .../AWSCognitoSync/CognitoSyncClient.swift | 195 +++++++++++--- .../AWSComprehend/ComprehendClient.swift | 195 +++++++++++--- .../ComprehendMedicalClient.swift | 195 +++++++++++--- .../ComputeOptimizerClient.swift | 203 +++++++++++--- .../AWSConfigService/ConfigClient.swift | 203 +++++++++++--- .../Sources/AWSConnect/ConnectClient.swift | 203 +++++++++++--- .../ConnectCampaignsClient.swift | 195 +++++++++++--- .../ConnectCampaignsV2Client.swift | 203 +++++++++++--- .../AWSConnectCases/ConnectCasesClient.swift | 203 +++++++++++--- .../ConnectContactLensClient.swift | 195 +++++++++++--- .../ConnectParticipantClient.swift | 195 +++++++++++--- .../ControlCatalogClient.swift | 195 +++++++++++--- .../AWSControlTower/ControlTowerClient.swift | 203 +++++++++++--- .../AWSCostExplorer/CostExplorerClient.swift | 203 +++++++++++--- .../CostOptimizationHubClient.swift | 195 +++++++++++--- .../CostandUsageReportClient.swift | 195 +++++++++++--- .../CustomerProfilesClient.swift | 195 +++++++++++--- .../AWSDAX/Sources/AWSDAX/DAXClient.swift | 195 +++++++++++--- .../AWSDLM/Sources/AWSDLM/DLMClient.swift | 195 +++++++++++--- .../AWSDSQL/Sources/AWSDSQL/DSQLClient.swift | 195 +++++++++++--- .../Sources/AWSDataBrew/DataBrewClient.swift | 203 +++++++++++--- .../AWSDataExchange/DataExchangeClient.swift | 203 +++++++++++--- .../AWSDataPipeline/DataPipelineClient.swift | 195 +++++++++++--- .../Sources/AWSDataSync/DataSyncClient.swift | 195 +++++++++++--- .../Sources/AWSDataZone/DataZoneClient.swift | 203 +++++++++++--- .../DatabaseMigrationClient.swift | 203 +++++++++++--- .../Sources/AWSDeadline/DeadlineClient.swift | 203 +++++++++++--- .../AWSDetective/DetectiveClient.swift | 203 +++++++++++--- .../AWSDevOpsGuru/DevOpsGuruClient.swift | 203 +++++++++++--- .../AWSDeviceFarm/DeviceFarmClient.swift | 195 +++++++++++--- .../DirectConnectClient.swift | 195 +++++++++++--- .../AWSDirectoryService/DirectoryClient.swift | 195 +++++++++++--- .../DirectoryServiceDataClient.swift | 195 +++++++++++--- .../Sources/AWSDocDB/DocDBClient.swift | 195 +++++++++++--- .../AWSDocDBElastic/DocDBElasticClient.swift | 195 +++++++++++--- .../AWSDrs/Sources/AWSDrs/DrsClient.swift | 203 +++++++++++--- .../Sources/AWSDynamoDB/DynamoDBClient.swift | 211 ++++++++++++--- .../DynamoDBStreamsClient.swift | 195 +++++++++++--- .../AWSEBS/Sources/AWSEBS/EBSClient.swift | 195 +++++++++++--- .../AWSEC2/Sources/AWSEC2/EC2Client.swift | 203 +++++++++++--- .../EC2InstanceConnectClient.swift | 195 +++++++++++--- .../AWSECR/Sources/AWSECR/ECRClient.swift | 203 +++++++++++--- .../AWSECRPUBLIC/ECRPUBLICClient.swift | 195 +++++++++++--- .../AWSECS/Sources/AWSECS/ECSClient.swift | 195 +++++++++++--- .../AWSEFS/Sources/AWSEFS/EFSClient.swift | 203 +++++++++++--- .../AWSEKS/Sources/AWSEKS/EKSClient.swift | 195 +++++++++++--- .../Sources/AWSEKSAuth/EKSAuthClient.swift | 195 +++++++++++--- .../AWSEMR/Sources/AWSEMR/EMRClient.swift | 195 +++++++++++--- .../EMRServerlessClient.swift | 195 +++++++++++--- .../EMRcontainersClient.swift | 195 +++++++++++--- .../AWSElastiCache/ElastiCacheClient.swift | 195 +++++++++++--- .../ElasticBeanstalkClient.swift | 203 +++++++++++--- .../ElasticInferenceClient.swift | 195 +++++++++++--- .../ElasticLoadBalancingClient.swift | 203 +++++++++++--- .../ElasticLoadBalancingv2Client.swift | 203 +++++++++++--- .../ElasticTranscoderClient.swift | 195 +++++++++++--- .../ElasticsearchClient.swift | 203 +++++++++++--- .../EntityResolutionClient.swift | 203 +++++++++++--- .../AWSEventBridge/EventBridgeClient.swift | 195 +++++++++++--- .../AWSEvidently/EvidentlyClient.swift | 203 +++++++++++--- .../AWSFMS/Sources/AWSFMS/FMSClient.swift | 203 +++++++++++--- .../AWSFSx/Sources/AWSFSx/FSxClient.swift | 203 +++++++++++--- .../Sources/AWSFinspace/FinspaceClient.swift | 203 +++++++++++--- .../AWSFinspacedata/FinspacedataClient.swift | 203 +++++++++++--- .../Sources/AWSFirehose/FirehoseClient.swift | 195 +++++++++++--- .../AWSFis/Sources/AWSFis/FisClient.swift | 195 +++++++++++--- .../Sources/AWSForecast/ForecastClient.swift | 195 +++++++++++--- .../ForecastqueryClient.swift | 195 +++++++++++--- .../FraudDetectorClient.swift | 195 +++++++++++--- .../Sources/AWSFreeTier/FreeTierClient.swift | 195 +++++++++++--- .../Sources/AWSGameLift/GameLiftClient.swift | 203 +++++++++++--- .../Sources/AWSGeoMaps/GeoMapsClient.swift | 195 +++++++++++--- .../AWSGeoPlaces/GeoPlacesClient.swift | 195 +++++++++++--- .../AWSGeoRoutes/GeoRoutesClient.swift | 195 +++++++++++--- .../Sources/AWSGlacier/GlacierClient.swift | 203 +++++++++++--- .../GlobalAcceleratorClient.swift | 195 +++++++++++--- .../AWSGlue/Sources/AWSGlue/GlueClient.swift | 203 +++++++++++--- .../Sources/AWSGrafana/GrafanaClient.swift | 195 +++++++++++--- .../AWSGreengrass/GreengrassClient.swift | 203 +++++++++++--- .../AWSGreengrassV2/GreengrassV2Client.swift | 203 +++++++++++--- .../GroundStationClient.swift | 203 +++++++++++--- .../AWSGuardDuty/GuardDutyClient.swift | 195 +++++++++++--- .../Sources/AWSHealth/HealthClient.swift | 195 +++++++++++--- .../AWSHealthLake/HealthLakeClient.swift | 195 +++++++++++--- .../AWSIAM/Sources/AWSIAM/IAMClient.swift | 203 +++++++++++--- .../AWSIVSRealTime/IVSRealTimeClient.swift | 203 +++++++++++--- .../IdentitystoreClient.swift | 195 +++++++++++--- .../AWSImagebuilder/ImagebuilderClient.swift | 195 +++++++++++--- .../AWSInspector/InspectorClient.swift | 203 +++++++++++--- .../AWSInspector2/Inspector2Client.swift | 195 +++++++++++--- .../InspectorScanClient.swift | 195 +++++++++++--- .../InternetMonitorClient.swift | 195 +++++++++++--- .../AWSInvoicing/InvoicingClient.swift | 195 +++++++++++--- .../AWSIoT/Sources/AWSIoT/IoTClient.swift | 203 +++++++++++--- .../IoT1ClickDevicesClient.swift | 195 +++++++++++--- .../IoT1ClickProjectsClient.swift | 195 +++++++++++--- .../AWSIoTAnalytics/IoTAnalyticsClient.swift | 203 +++++++++++--- .../AWSIoTDataPlane/IoTDataPlaneClient.swift | 195 +++++++++++--- .../AWSIoTEvents/IoTEventsClient.swift | 195 +++++++++++--- .../IoTEventsDataClient.swift | 195 +++++++++++--- .../AWSIoTFleetHub/IoTFleetHubClient.swift | 195 +++++++++++--- .../AWSIoTFleetWise/IoTFleetWiseClient.swift | 195 +++++++++++--- .../IoTJobsDataPlaneClient.swift | 195 +++++++++++--- .../IoTSecureTunnelingClient.swift | 195 +++++++++++--- .../AWSIoTSiteWise/IoTSiteWiseClient.swift | 203 +++++++++++--- .../IoTThingsGraphClient.swift | 203 +++++++++++--- .../AWSIoTTwinMaker/IoTTwinMakerClient.swift | 203 +++++++++++--- .../AWSIoTWireless/IoTWirelessClient.swift | 203 +++++++++++--- .../IotDeviceAdvisorClient.swift | 195 +++++++++++--- .../AWSIvs/Sources/AWSIvs/IvsClient.swift | 203 +++++++++++--- .../Sources/AWSIvschat/IvschatClient.swift | 195 +++++++++++--- .../AWSKMS/Sources/AWSKMS/KMSClient.swift | 195 +++++++++++--- .../Sources/AWSKafka/KafkaClient.swift | 203 +++++++++++--- .../AWSKafkaConnect/KafkaConnectClient.swift | 195 +++++++++++--- .../Sources/AWSKendra/KendraClient.swift | 195 +++++++++++--- .../KendraRankingClient.swift | 195 +++++++++++--- .../AWSKeyspaces/KeyspacesClient.swift | 195 +++++++++++--- .../Sources/AWSKinesis/KinesisClient.swift | 203 +++++++++++--- .../KinesisAnalyticsClient.swift | 195 +++++++++++--- .../KinesisAnalyticsV2Client.swift | 203 +++++++++++--- .../AWSKinesisVideo/KinesisVideoClient.swift | 203 +++++++++++--- .../KinesisVideoArchivedMediaClient.swift | 195 +++++++++++--- .../KinesisVideoMediaClient.swift | 195 +++++++++++--- .../KinesisVideoSignalingClient.swift | 195 +++++++++++--- .../KinesisVideoWebRTCStorageClient.swift | 195 +++++++++++--- .../LakeFormationClient.swift | 195 +++++++++++--- .../Sources/AWSLambda/LambdaClient.swift | 195 +++++++++++--- .../AWSLaunchWizard/LaunchWizardClient.swift | 195 +++++++++++--- .../LexModelBuildingClient.swift | 203 +++++++++++--- .../AWSLexModelsV2/LexModelsV2Client.swift | 203 +++++++++++--- .../LexRuntimeClient.swift | 195 +++++++++++--- .../AWSLexRuntimeV2/LexRuntimeV2Client.swift | 195 +++++++++++--- .../LicenseManagerClient.swift | 195 +++++++++++--- ...censeManagerLinuxSubscriptionsClient.swift | 195 +++++++++++--- ...icenseManagerUserSubscriptionsClient.swift | 195 +++++++++++--- .../AWSLightsail/LightsailClient.swift | 203 +++++++++++--- .../Sources/AWSLocation/LocationClient.swift | 195 +++++++++++--- .../LookoutEquipmentClient.swift | 203 +++++++++++--- .../LookoutMetricsClient.swift | 203 +++++++++++--- .../LookoutVisionClient.swift | 195 +++++++++++--- .../AWSM2/Sources/AWSM2/M2Client.swift | 203 +++++++++++--- .../Sources/AWSMTurk/MTurkClient.swift | 203 +++++++++++--- .../AWSMWAA/Sources/AWSMWAA/MWAAClient.swift | 195 +++++++++++--- .../MachineLearningClient.swift | 203 +++++++++++--- .../Sources/AWSMacie2/Macie2Client.swift | 195 +++++++++++--- .../AWSMailManager/MailManagerClient.swift | 203 +++++++++++--- .../ManagedBlockchainClient.swift | 195 +++++++++++--- .../ManagedBlockchainQueryClient.swift | 195 +++++++++++--- .../MarketplaceAgreementClient.swift | 195 +++++++++++--- .../MarketplaceCatalogClient.swift | 195 +++++++++++--- .../MarketplaceCommerceAnalyticsClient.swift | 195 +++++++++++--- .../MarketplaceDeploymentClient.swift | 195 +++++++++++--- .../MarketplaceEntitlementClient.swift | 195 +++++++++++--- .../MarketplaceMeteringClient.swift | 195 +++++++++++--- .../MarketplaceReportingClient.swift | 195 +++++++++++--- .../AWSMediaConnect/MediaConnectClient.swift | 195 +++++++++++--- .../AWSMediaConvert/MediaConvertClient.swift | 203 +++++++++++--- .../AWSMediaLive/MediaLiveClient.swift | 203 +++++++++++--- .../AWSMediaPackage/MediaPackageClient.swift | 195 +++++++++++--- .../MediaPackageV2Client.swift | 203 +++++++++++--- .../MediaPackageVodClient.swift | 195 +++++++++++--- .../AWSMediaStore/MediaStoreClient.swift | 195 +++++++++++--- .../MediaStoreDataClient.swift | 195 +++++++++++--- .../AWSMediaTailor/MediaTailorClient.swift | 203 +++++++++++--- .../MedicalImagingClient.swift | 195 +++++++++++--- .../Sources/AWSMemoryDB/MemoryDBClient.swift | 203 +++++++++++--- .../AWSMgn/Sources/AWSMgn/MgnClient.swift | 195 +++++++++++--- .../AWSMigrationHub/MigrationHubClient.swift | 195 +++++++++++--- .../MigrationHubConfigClient.swift | 195 +++++++++++--- .../MigrationHubOrchestratorClient.swift | 203 +++++++++++--- .../MigrationHubRefactorSpacesClient.swift | 195 +++++++++++--- .../MigrationHubStrategyClient.swift | 195 +++++++++++--- .../AWSMq/Sources/AWSMq/MqClient.swift | 195 +++++++++++--- .../Sources/AWSNeptune/NeptuneClient.swift | 195 +++++++++++--- .../AWSNeptuneGraph/NeptuneGraphClient.swift | 203 +++++++++++--- .../AWSNeptunedata/NeptunedataClient.swift | 203 +++++++++++--- .../NetworkFirewallClient.swift | 203 +++++++++++--- .../NetworkFlowMonitorClient.swift | 195 +++++++++++--- .../NetworkManagerClient.swift | 195 +++++++++++--- .../NetworkMonitorClient.swift | 195 +++++++++++--- .../NotificationsClient.swift | 195 +++++++++++--- .../NotificationsContactsClient.swift | 195 +++++++++++--- .../AWSOAM/Sources/AWSOAM/OAMClient.swift | 195 +++++++++++--- .../AWSOSIS/Sources/AWSOSIS/OSISClient.swift | 195 +++++++++++--- .../ObservabilityAdminClient.swift | 195 +++++++++++--- .../Sources/AWSOmics/OmicsClient.swift | 203 +++++++++++--- .../AWSOpenSearch/OpenSearchClient.swift | 195 +++++++++++--- .../OpenSearchServerlessClient.swift | 203 +++++++++++--- .../Sources/AWSOpsWorks/OpsWorksClient.swift | 195 +++++++++++--- .../AWSOpsWorksCM/OpsWorksCMClient.swift | 195 +++++++++++--- .../OrganizationsClient.swift | 195 +++++++++++--- .../Sources/AWSOutposts/OutpostsClient.swift | 203 +++++++++++--- .../AWSPCS/Sources/AWSPCS/PCSClient.swift | 195 +++++++++++--- .../AWSPI/Sources/AWSPI/PIClient.swift | 195 +++++++++++--- .../Sources/AWSPanorama/PanoramaClient.swift | 203 +++++++++++--- .../PartnerCentralSellingClient.swift | 195 +++++++++++--- .../PaymentCryptographyClient.swift | 195 +++++++++++--- .../PaymentCryptographyDataClient.swift | 195 +++++++++++--- .../PcaConnectorAdClient.swift | 195 +++++++++++--- .../PcaConnectorScepClient.swift | 195 +++++++++++--- .../AWSPersonalize/PersonalizeClient.swift | 195 +++++++++++--- .../PersonalizeEventsClient.swift | 195 +++++++++++--- .../PersonalizeRuntimeClient.swift | 195 +++++++++++--- .../Sources/AWSPinpoint/PinpointClient.swift | 203 +++++++++++--- .../PinpointEmailClient.swift | 203 +++++++++++--- .../PinpointSMSVoiceClient.swift | 195 +++++++++++--- .../PinpointSMSVoiceV2Client.swift | 203 +++++++++++--- .../Sources/AWSPipes/PipesClient.swift | 195 +++++++++++--- .../Sources/AWSPolly/PollyClient.swift | 195 +++++++++++--- .../Sources/AWSPricing/PricingClient.swift | 195 +++++++++++--- .../PrivateNetworksClient.swift | 195 +++++++++++--- .../Sources/AWSProton/ProtonClient.swift | 195 +++++++++++--- .../Sources/AWSQApps/QAppsClient.swift | 203 +++++++++++--- .../AWSQBusiness/QBusinessClient.swift | 195 +++++++++++--- .../Sources/AWSQConnect/QConnectClient.swift | 203 +++++++++++--- .../AWSQLDB/Sources/AWSQLDB/QLDBClient.swift | 195 +++++++++++--- .../AWSQLDBSession/QLDBSessionClient.swift | 195 +++++++++++--- .../AWSQuickSight/QuickSightClient.swift | 203 +++++++++++--- .../AWSRAM/Sources/AWSRAM/RAMClient.swift | 203 +++++++++++--- .../AWSRDS/Sources/AWSRDS/RDSClient.swift | 203 +++++++++++--- .../Sources/AWSRDSData/RDSDataClient.swift | 195 +++++++++++--- .../AWSRUM/Sources/AWSRUM/RUMClient.swift | 195 +++++++++++--- .../AWSRbin/Sources/AWSRbin/RbinClient.swift | 195 +++++++++++--- .../Sources/AWSRedshift/RedshiftClient.swift | 203 +++++++++++--- .../AWSRedshiftData/RedshiftDataClient.swift | 195 +++++++++++--- .../RedshiftServerlessClient.swift | 195 +++++++++++--- .../AWSRekognition/RekognitionClient.swift | 195 +++++++++++--- .../AWSRepostspace/RepostspaceClient.swift | 195 +++++++++++--- .../ResiliencehubClient.swift | 195 +++++++++++--- .../ResourceExplorer2Client.swift | 195 +++++++++++--- .../ResourceGroupsClient.swift | 195 +++++++++++--- .../ResourceGroupsTaggingAPIClient.swift | 195 +++++++++++--- .../AWSRoboMaker/RoboMakerClient.swift | 195 +++++++++++--- .../RolesAnywhereClient.swift | 203 +++++++++++--- .../Sources/AWSRoute53/Route53Client.swift | 195 +++++++++++--- .../Route53DomainsClient.swift | 203 +++++++++++--- .../Route53ProfilesClient.swift | 195 +++++++++++--- .../Route53RecoveryClusterClient.swift | 195 +++++++++++--- .../Route53RecoveryControlConfigClient.swift | 195 +++++++++++--- .../Route53RecoveryReadinessClient.swift | 203 +++++++++++--- .../Route53ResolverClient.swift | 195 +++++++++++--- .../AWSS3/Sources/AWSS3/S3Client.swift | 251 +++++++++++++++--- .../AWSS3Control/S3ControlClient.swift | 211 ++++++++++++--- .../AWSS3Outposts/S3OutpostsClient.swift | 195 +++++++++++--- .../Sources/AWSS3Tables/S3TablesClient.swift | 195 +++++++++++--- .../AWSSES/Sources/AWSSES/SESClient.swift | 195 +++++++++++--- .../Sources/AWSSESv2/SESv2Client.swift | 203 +++++++++++--- .../AWSSFN/Sources/AWSSFN/SFNClient.swift | 203 +++++++++++--- .../AWSSMS/Sources/AWSSMS/SMSClient.swift | 203 +++++++++++--- .../AWSSNS/Sources/AWSSNS/SNSClient.swift | 203 +++++++++++--- .../AWSSQS/Sources/AWSSQS/SQSClient.swift | 195 +++++++++++--- .../AWSSSM/Sources/AWSSSM/SSMClient.swift | 203 +++++++++++--- .../AWSSSMContacts/SSMContactsClient.swift | 203 +++++++++++--- .../AWSSSMIncidents/SSMIncidentsClient.swift | 203 +++++++++++--- .../SSMQuickSetupClient.swift | 195 +++++++++++--- .../AWSSSO/Sources/AWSSSO/SSOClient.swift | 195 +++++++++++--- .../Sources/AWSSSOAdmin/SSOAdminClient.swift | 195 +++++++++++--- .../Sources/AWSSSOOIDC/SSOOIDCClient.swift | 195 +++++++++++--- .../AWSSTS/Sources/AWSSTS/STSClient.swift | 203 +++++++++++--- .../AWSSWF/Sources/AWSSWF/SWFClient.swift | 203 +++++++++++--- .../AWSSageMaker/SageMakerClient.swift | 203 +++++++++++--- .../SageMakerA2IRuntimeClient.swift | 195 +++++++++++--- .../SageMakerFeatureStoreRuntimeClient.swift | 195 +++++++++++--- .../SageMakerGeospatialClient.swift | 195 +++++++++++--- .../SageMakerMetricsClient.swift | 195 +++++++++++--- .../SageMakerRuntimeClient.swift | 195 +++++++++++--- .../SagemakerEdgeClient.swift | 195 +++++++++++--- .../AWSSavingsplans/SavingsplansClient.swift | 195 +++++++++++--- .../AWSScheduler/SchedulerClient.swift | 195 +++++++++++--- .../Sources/AWSSchemas/SchemasClient.swift | 203 +++++++++++--- .../SecretsManagerClient.swift | 195 +++++++++++--- .../AWSSecurityHub/SecurityHubClient.swift | 195 +++++++++++--- .../AWSSecurityIR/SecurityIRClient.swift | 195 +++++++++++--- .../AWSSecurityLake/SecurityLakeClient.swift | 203 +++++++++++--- ...erverlessApplicationRepositoryClient.swift | 195 +++++++++++--- .../ServiceCatalogClient.swift | 203 +++++++++++--- .../ServiceCatalogAppRegistryClient.swift | 195 +++++++++++--- .../ServiceDiscoveryClient.swift | 195 +++++++++++--- .../ServiceQuotasClient.swift | 195 +++++++++++--- .../Sources/AWSShield/ShieldClient.swift | 203 +++++++++++--- .../Sources/AWSSigner/SignerClient.swift | 195 +++++++++++--- .../SimSpaceWeaverClient.swift | 195 +++++++++++--- .../SnowDeviceManagementClient.swift | 195 +++++++++++--- .../Sources/AWSSnowball/SnowballClient.swift | 195 +++++++++++--- .../SocialMessagingClient.swift | 195 +++++++++++--- .../Sources/AWSSsmSap/SsmSapClient.swift | 195 +++++++++++--- .../StorageGatewayClient.swift | 203 +++++++++++--- .../AWSSupplyChain/SupplyChainClient.swift | 195 +++++++++++--- .../Sources/AWSSupport/SupportClient.swift | 195 +++++++++++--- .../AWSSupportApp/SupportAppClient.swift | 195 +++++++++++--- .../AWSSynthetics/SyntheticsClient.swift | 195 +++++++++++--- .../AWSTaxSettings/TaxSettingsClient.swift | 195 +++++++++++--- .../Sources/AWSTextract/TextractClient.swift | 195 +++++++++++--- .../TimestreamInfluxDBClient.swift | 195 +++++++++++--- .../TimestreamQueryClient.swift | 195 +++++++++++--- .../TimestreamWriteClient.swift | 195 +++++++++++--- .../AWSTnb/Sources/AWSTnb/TnbClient.swift | 203 +++++++++++--- .../AWSTranscribe/TranscribeClient.swift | 203 +++++++++++--- .../TranscribeStreamingClient.swift | 195 +++++++++++--- .../Sources/AWSTransfer/TransferClient.swift | 195 +++++++++++--- .../AWSTranslate/TranslateClient.swift | 195 +++++++++++--- .../TrustedAdvisorClient.swift | 195 +++++++++++--- .../AWSVPCLattice/VPCLatticeClient.swift | 195 +++++++++++--- .../VerifiedPermissionsClient.swift | 195 +++++++++++--- .../Sources/AWSVoiceID/VoiceIDClient.swift | 203 +++++++++++--- .../AWSWAF/Sources/AWSWAF/WAFClient.swift | 195 +++++++++++--- .../AWSWAFRegional/WAFRegionalClient.swift | 195 +++++++++++--- .../Sources/AWSWAFV2/WAFV2Client.swift | 195 +++++++++++--- .../WellArchitectedClient.swift | 195 +++++++++++--- .../Sources/AWSWisdom/WisdomClient.swift | 203 +++++++++++--- .../Sources/AWSWorkDocs/WorkDocsClient.swift | 203 +++++++++++--- .../Sources/AWSWorkMail/WorkMailClient.swift | 203 +++++++++++--- .../WorkMailMessageFlowClient.swift | 195 +++++++++++--- .../AWSWorkSpaces/WorkSpacesClient.swift | 195 +++++++++++--- .../WorkSpacesThinClientClient.swift | 195 +++++++++++--- .../WorkSpacesWebClient.swift | 195 +++++++++++--- .../AWSXRay/Sources/AWSXRay/XRayClient.swift | 203 +++++++++++--- 401 files changed, 66771 insertions(+), 12576 deletions(-) diff --git a/Sources/Services/AWSACM/Sources/AWSACM/ACMClient.swift b/Sources/Services/AWSACM/Sources/AWSACM/ACMClient.swift index bb8c8e7b648..0d38c8fa517 100644 --- a/Sources/Services/AWSACM/Sources/AWSACM/ACMClient.swift +++ b/Sources/Services/AWSACM/Sources/AWSACM/ACMClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ACMClient: ClientRuntime.Client { public static let clientName = "ACMClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ACMClient.ACMClientConfiguration let serviceName = "ACM" @@ -86,52 +86,54 @@ public class ACMClient: ClientRuntime.Client { } extension ACMClient { + public class ACMClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension ACMClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: ACMClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultACMAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultACMAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultACMAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultACMAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultACMAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultACMAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ACMClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSACMPCA/Sources/AWSACMPCA/ACMPCAClient.swift b/Sources/Services/AWSACMPCA/Sources/AWSACMPCA/ACMPCAClient.swift index 46720c9e95b..a6eb38e4fb6 100644 --- a/Sources/Services/AWSACMPCA/Sources/AWSACMPCA/ACMPCAClient.swift +++ b/Sources/Services/AWSACMPCA/Sources/AWSACMPCA/ACMPCAClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ACMPCAClient: ClientRuntime.Client { public static let clientName = "ACMPCAClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ACMPCAClient.ACMPCAClientConfiguration let serviceName = "ACM PCA" @@ -86,52 +86,54 @@ public class ACMPCAClient: ClientRuntime.Client { } extension ACMPCAClient { + public class ACMPCAClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension ACMPCAClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: ACMPCAClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultACMPCAAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultACMPCAAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultACMPCAAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultACMPCAAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultACMPCAAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultACMPCAAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ACMPCAClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSAPIGateway/Sources/AWSAPIGateway/APIGatewayClient.swift b/Sources/Services/AWSAPIGateway/Sources/AWSAPIGateway/APIGatewayClient.swift index 5290a5a3151..c3e1ad6430f 100644 --- a/Sources/Services/AWSAPIGateway/Sources/AWSAPIGateway/APIGatewayClient.swift +++ b/Sources/Services/AWSAPIGateway/Sources/AWSAPIGateway/APIGatewayClient.swift @@ -68,7 +68,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class APIGatewayClient: ClientRuntime.Client { public static let clientName = "APIGatewayClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: APIGatewayClient.APIGatewayClientConfiguration let serviceName = "API Gateway" @@ -90,52 +90,54 @@ public class APIGatewayClient: ClientRuntime.Client { } extension APIGatewayClient { + public class APIGatewayClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -160,25 +162,158 @@ extension APIGatewayClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: APIGatewayClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultAPIGatewayAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultAPIGatewayAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultAPIGatewayAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultAPIGatewayAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultAPIGatewayAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultAPIGatewayAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(APIGatewayClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSARCZonalShift/Sources/AWSARCZonalShift/ARCZonalShiftClient.swift b/Sources/Services/AWSARCZonalShift/Sources/AWSARCZonalShift/ARCZonalShiftClient.swift index df26111c6bc..1e8ce498489 100644 --- a/Sources/Services/AWSARCZonalShift/Sources/AWSARCZonalShift/ARCZonalShiftClient.swift +++ b/Sources/Services/AWSARCZonalShift/Sources/AWSARCZonalShift/ARCZonalShiftClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ARCZonalShiftClient: ClientRuntime.Client { public static let clientName = "ARCZonalShiftClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ARCZonalShiftClient.ARCZonalShiftClientConfiguration let serviceName = "ARC Zonal Shift" @@ -86,52 +86,54 @@ public class ARCZonalShiftClient: ClientRuntime.Client { } extension ARCZonalShiftClient { + public class ARCZonalShiftClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension ARCZonalShiftClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: ARCZonalShiftClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultARCZonalShiftAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultARCZonalShiftAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultARCZonalShiftAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultARCZonalShiftAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultARCZonalShiftAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultARCZonalShiftAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ARCZonalShiftClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSAccessAnalyzer/Sources/AWSAccessAnalyzer/AccessAnalyzerClient.swift b/Sources/Services/AWSAccessAnalyzer/Sources/AWSAccessAnalyzer/AccessAnalyzerClient.swift index a680b9b8f56..d84ee724820 100644 --- a/Sources/Services/AWSAccessAnalyzer/Sources/AWSAccessAnalyzer/AccessAnalyzerClient.swift +++ b/Sources/Services/AWSAccessAnalyzer/Sources/AWSAccessAnalyzer/AccessAnalyzerClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class AccessAnalyzerClient: ClientRuntime.Client { public static let clientName = "AccessAnalyzerClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: AccessAnalyzerClient.AccessAnalyzerClientConfiguration let serviceName = "AccessAnalyzer" @@ -87,52 +87,54 @@ public class AccessAnalyzerClient: ClientRuntime.Client { } extension AccessAnalyzerClient { + public class AccessAnalyzerClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension AccessAnalyzerClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: AccessAnalyzerClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultAccessAnalyzerAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultAccessAnalyzerAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultAccessAnalyzerAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultAccessAnalyzerAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultAccessAnalyzerAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultAccessAnalyzerAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(AccessAnalyzerClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSAccount/Sources/AWSAccount/AccountClient.swift b/Sources/Services/AWSAccount/Sources/AWSAccount/AccountClient.swift index e542f2a684d..2b74fa10a07 100644 --- a/Sources/Services/AWSAccount/Sources/AWSAccount/AccountClient.swift +++ b/Sources/Services/AWSAccount/Sources/AWSAccount/AccountClient.swift @@ -62,7 +62,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class AccountClient: ClientRuntime.Client { public static let clientName = "AccountClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: AccountClient.AccountClientConfiguration let serviceName = "Account" @@ -84,52 +84,54 @@ public class AccountClient: ClientRuntime.Client { } extension AccountClient { + public class AccountClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -154,25 +156,158 @@ extension AccountClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: AccountClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultAccountAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultAccountAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultAccountAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultAccountAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultAccountAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultAccountAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(AccountClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSAmp/Sources/AWSAmp/AmpClient.swift b/Sources/Services/AWSAmp/Sources/AWSAmp/AmpClient.swift index b369bc7d977..318a0ebc4b3 100644 --- a/Sources/Services/AWSAmp/Sources/AWSAmp/AmpClient.swift +++ b/Sources/Services/AWSAmp/Sources/AWSAmp/AmpClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class AmpClient: ClientRuntime.Client { public static let clientName = "AmpClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: AmpClient.AmpClientConfiguration let serviceName = "amp" @@ -87,52 +87,54 @@ public class AmpClient: ClientRuntime.Client { } extension AmpClient { + public class AmpClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension AmpClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: AmpClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultAmpAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultAmpAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultAmpAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultAmpAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultAmpAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultAmpAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(AmpClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSAmplify/Sources/AWSAmplify/AmplifyClient.swift b/Sources/Services/AWSAmplify/Sources/AWSAmplify/AmplifyClient.swift index 668a10a6e9c..fcbe572edb6 100644 --- a/Sources/Services/AWSAmplify/Sources/AWSAmplify/AmplifyClient.swift +++ b/Sources/Services/AWSAmplify/Sources/AWSAmplify/AmplifyClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class AmplifyClient: ClientRuntime.Client { public static let clientName = "AmplifyClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: AmplifyClient.AmplifyClientConfiguration let serviceName = "Amplify" @@ -86,52 +86,54 @@ public class AmplifyClient: ClientRuntime.Client { } extension AmplifyClient { + public class AmplifyClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension AmplifyClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: AmplifyClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultAmplifyAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultAmplifyAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultAmplifyAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultAmplifyAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultAmplifyAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultAmplifyAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(AmplifyClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSAmplifyBackend/Sources/AWSAmplifyBackend/AmplifyBackendClient.swift b/Sources/Services/AWSAmplifyBackend/Sources/AWSAmplifyBackend/AmplifyBackendClient.swift index a11dc2670fc..a764b8b1ccb 100644 --- a/Sources/Services/AWSAmplifyBackend/Sources/AWSAmplifyBackend/AmplifyBackendClient.swift +++ b/Sources/Services/AWSAmplifyBackend/Sources/AWSAmplifyBackend/AmplifyBackendClient.swift @@ -62,7 +62,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class AmplifyBackendClient: ClientRuntime.Client { public static let clientName = "AmplifyBackendClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: AmplifyBackendClient.AmplifyBackendClientConfiguration let serviceName = "AmplifyBackend" @@ -84,52 +84,54 @@ public class AmplifyBackendClient: ClientRuntime.Client { } extension AmplifyBackendClient { + public class AmplifyBackendClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -154,25 +156,158 @@ extension AmplifyBackendClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: AmplifyBackendClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultAmplifyBackendAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultAmplifyBackendAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultAmplifyBackendAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultAmplifyBackendAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultAmplifyBackendAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultAmplifyBackendAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(AmplifyBackendClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSAmplifyUIBuilder/Sources/AWSAmplifyUIBuilder/AmplifyUIBuilderClient.swift b/Sources/Services/AWSAmplifyUIBuilder/Sources/AWSAmplifyUIBuilder/AmplifyUIBuilderClient.swift index a5b601228d6..6b69e015211 100644 --- a/Sources/Services/AWSAmplifyUIBuilder/Sources/AWSAmplifyUIBuilder/AmplifyUIBuilderClient.swift +++ b/Sources/Services/AWSAmplifyUIBuilder/Sources/AWSAmplifyUIBuilder/AmplifyUIBuilderClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class AmplifyUIBuilderClient: ClientRuntime.Client { public static let clientName = "AmplifyUIBuilderClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: AmplifyUIBuilderClient.AmplifyUIBuilderClientConfiguration let serviceName = "AmplifyUIBuilder" @@ -87,52 +87,54 @@ public class AmplifyUIBuilderClient: ClientRuntime.Client { } extension AmplifyUIBuilderClient { + public class AmplifyUIBuilderClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension AmplifyUIBuilderClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: AmplifyUIBuilderClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultAmplifyUIBuilderAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultAmplifyUIBuilderAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultAmplifyUIBuilderAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultAmplifyUIBuilderAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultAmplifyUIBuilderAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultAmplifyUIBuilderAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(AmplifyUIBuilderClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSApiGatewayManagementApi/Sources/AWSApiGatewayManagementApi/ApiGatewayManagementApiClient.swift b/Sources/Services/AWSApiGatewayManagementApi/Sources/AWSApiGatewayManagementApi/ApiGatewayManagementApiClient.swift index bdd716dc17c..25d2d0cf893 100644 --- a/Sources/Services/AWSApiGatewayManagementApi/Sources/AWSApiGatewayManagementApi/ApiGatewayManagementApiClient.swift +++ b/Sources/Services/AWSApiGatewayManagementApi/Sources/AWSApiGatewayManagementApi/ApiGatewayManagementApiClient.swift @@ -62,7 +62,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ApiGatewayManagementApiClient: ClientRuntime.Client { public static let clientName = "ApiGatewayManagementApiClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ApiGatewayManagementApiClient.ApiGatewayManagementApiClientConfiguration let serviceName = "ApiGatewayManagementApi" @@ -84,52 +84,54 @@ public class ApiGatewayManagementApiClient: ClientRuntime.Client { } extension ApiGatewayManagementApiClient { + public class ApiGatewayManagementApiClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -154,25 +156,158 @@ extension ApiGatewayManagementApiClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: ApiGatewayManagementApiClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultApiGatewayManagementApiAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultApiGatewayManagementApiAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultApiGatewayManagementApiAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultApiGatewayManagementApiAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultApiGatewayManagementApiAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultApiGatewayManagementApiAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ApiGatewayManagementApiClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSApiGatewayV2/Sources/AWSApiGatewayV2/ApiGatewayV2Client.swift b/Sources/Services/AWSApiGatewayV2/Sources/AWSApiGatewayV2/ApiGatewayV2Client.swift index ab6f4646391..9b33d254dc5 100644 --- a/Sources/Services/AWSApiGatewayV2/Sources/AWSApiGatewayV2/ApiGatewayV2Client.swift +++ b/Sources/Services/AWSApiGatewayV2/Sources/AWSApiGatewayV2/ApiGatewayV2Client.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ApiGatewayV2Client: ClientRuntime.Client { public static let clientName = "ApiGatewayV2Client" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ApiGatewayV2Client.ApiGatewayV2ClientConfiguration let serviceName = "ApiGatewayV2" @@ -86,52 +86,54 @@ public class ApiGatewayV2Client: ClientRuntime.Client { } extension ApiGatewayV2Client { + public class ApiGatewayV2ClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension ApiGatewayV2Client { self.logger = telemetryProvider.loggerProvider.getLogger(name: ApiGatewayV2Client.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultApiGatewayV2AuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultApiGatewayV2AuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultApiGatewayV2AuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultApiGatewayV2AuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultApiGatewayV2AuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultApiGatewayV2AuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ApiGatewayV2Client.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSAppConfig/Sources/AWSAppConfig/AppConfigClient.swift b/Sources/Services/AWSAppConfig/Sources/AWSAppConfig/AppConfigClient.swift index 1f986a32cc4..0e4c1989c7e 100644 --- a/Sources/Services/AWSAppConfig/Sources/AWSAppConfig/AppConfigClient.swift +++ b/Sources/Services/AWSAppConfig/Sources/AWSAppConfig/AppConfigClient.swift @@ -67,7 +67,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class AppConfigClient: ClientRuntime.Client { public static let clientName = "AppConfigClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: AppConfigClient.AppConfigClientConfiguration let serviceName = "AppConfig" @@ -89,52 +89,54 @@ public class AppConfigClient: ClientRuntime.Client { } extension AppConfigClient { + public class AppConfigClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -159,25 +161,158 @@ extension AppConfigClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: AppConfigClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultAppConfigAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultAppConfigAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultAppConfigAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultAppConfigAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultAppConfigAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultAppConfigAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(AppConfigClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSAppConfigData/Sources/AWSAppConfigData/AppConfigDataClient.swift b/Sources/Services/AWSAppConfigData/Sources/AWSAppConfigData/AppConfigDataClient.swift index 1258116e7c6..a1113ddd5a7 100644 --- a/Sources/Services/AWSAppConfigData/Sources/AWSAppConfigData/AppConfigDataClient.swift +++ b/Sources/Services/AWSAppConfigData/Sources/AWSAppConfigData/AppConfigDataClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class AppConfigDataClient: ClientRuntime.Client { public static let clientName = "AppConfigDataClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: AppConfigDataClient.AppConfigDataClientConfiguration let serviceName = "AppConfigData" @@ -86,52 +86,54 @@ public class AppConfigDataClient: ClientRuntime.Client { } extension AppConfigDataClient { + public class AppConfigDataClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension AppConfigDataClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: AppConfigDataClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultAppConfigDataAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultAppConfigDataAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultAppConfigDataAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultAppConfigDataAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultAppConfigDataAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultAppConfigDataAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(AppConfigDataClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSAppFabric/Sources/AWSAppFabric/AppFabricClient.swift b/Sources/Services/AWSAppFabric/Sources/AWSAppFabric/AppFabricClient.swift index 33bf4c14234..815de88ebff 100644 --- a/Sources/Services/AWSAppFabric/Sources/AWSAppFabric/AppFabricClient.swift +++ b/Sources/Services/AWSAppFabric/Sources/AWSAppFabric/AppFabricClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class AppFabricClient: ClientRuntime.Client { public static let clientName = "AppFabricClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: AppFabricClient.AppFabricClientConfiguration let serviceName = "AppFabric" @@ -86,52 +86,54 @@ public class AppFabricClient: ClientRuntime.Client { } extension AppFabricClient { + public class AppFabricClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension AppFabricClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: AppFabricClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultAppFabricAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultAppFabricAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultAppFabricAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultAppFabricAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultAppFabricAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultAppFabricAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(AppFabricClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSAppIntegrations/Sources/AWSAppIntegrations/AppIntegrationsClient.swift b/Sources/Services/AWSAppIntegrations/Sources/AWSAppIntegrations/AppIntegrationsClient.swift index e8c793bd988..cef2d822c89 100644 --- a/Sources/Services/AWSAppIntegrations/Sources/AWSAppIntegrations/AppIntegrationsClient.swift +++ b/Sources/Services/AWSAppIntegrations/Sources/AWSAppIntegrations/AppIntegrationsClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class AppIntegrationsClient: ClientRuntime.Client { public static let clientName = "AppIntegrationsClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: AppIntegrationsClient.AppIntegrationsClientConfiguration let serviceName = "AppIntegrations" @@ -87,52 +87,54 @@ public class AppIntegrationsClient: ClientRuntime.Client { } extension AppIntegrationsClient { + public class AppIntegrationsClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension AppIntegrationsClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: AppIntegrationsClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultAppIntegrationsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultAppIntegrationsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultAppIntegrationsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultAppIntegrationsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultAppIntegrationsAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultAppIntegrationsAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(AppIntegrationsClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSAppMesh/Sources/AWSAppMesh/AppMeshClient.swift b/Sources/Services/AWSAppMesh/Sources/AWSAppMesh/AppMeshClient.swift index 235ef8216a2..74b2e63ce1e 100644 --- a/Sources/Services/AWSAppMesh/Sources/AWSAppMesh/AppMeshClient.swift +++ b/Sources/Services/AWSAppMesh/Sources/AWSAppMesh/AppMeshClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class AppMeshClient: ClientRuntime.Client { public static let clientName = "AppMeshClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: AppMeshClient.AppMeshClientConfiguration let serviceName = "App Mesh" @@ -86,52 +86,54 @@ public class AppMeshClient: ClientRuntime.Client { } extension AppMeshClient { + public class AppMeshClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension AppMeshClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: AppMeshClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultAppMeshAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultAppMeshAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultAppMeshAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultAppMeshAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultAppMeshAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultAppMeshAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(AppMeshClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSAppRunner/Sources/AWSAppRunner/AppRunnerClient.swift b/Sources/Services/AWSAppRunner/Sources/AWSAppRunner/AppRunnerClient.swift index d6072a2e315..32859d781f6 100644 --- a/Sources/Services/AWSAppRunner/Sources/AWSAppRunner/AppRunnerClient.swift +++ b/Sources/Services/AWSAppRunner/Sources/AWSAppRunner/AppRunnerClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class AppRunnerClient: ClientRuntime.Client { public static let clientName = "AppRunnerClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: AppRunnerClient.AppRunnerClientConfiguration let serviceName = "AppRunner" @@ -85,52 +85,54 @@ public class AppRunnerClient: ClientRuntime.Client { } extension AppRunnerClient { + public class AppRunnerClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension AppRunnerClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: AppRunnerClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultAppRunnerAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultAppRunnerAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultAppRunnerAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultAppRunnerAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultAppRunnerAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultAppRunnerAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(AppRunnerClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSAppStream/Sources/AWSAppStream/AppStreamClient.swift b/Sources/Services/AWSAppStream/Sources/AWSAppStream/AppStreamClient.swift index 29bb494c94d..80120af8360 100644 --- a/Sources/Services/AWSAppStream/Sources/AWSAppStream/AppStreamClient.swift +++ b/Sources/Services/AWSAppStream/Sources/AWSAppStream/AppStreamClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class AppStreamClient: ClientRuntime.Client { public static let clientName = "AppStreamClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: AppStreamClient.AppStreamClientConfiguration let serviceName = "AppStream" @@ -86,52 +86,54 @@ public class AppStreamClient: ClientRuntime.Client { } extension AppStreamClient { + public class AppStreamClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension AppStreamClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: AppStreamClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultAppStreamAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultAppStreamAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultAppStreamAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultAppStreamAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultAppStreamAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultAppStreamAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(AppStreamClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSAppSync/Sources/AWSAppSync/AppSyncClient.swift b/Sources/Services/AWSAppSync/Sources/AWSAppSync/AppSyncClient.swift index e24df9519ff..aeb496fe21f 100644 --- a/Sources/Services/AWSAppSync/Sources/AWSAppSync/AppSyncClient.swift +++ b/Sources/Services/AWSAppSync/Sources/AWSAppSync/AppSyncClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class AppSyncClient: ClientRuntime.Client { public static let clientName = "AppSyncClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: AppSyncClient.AppSyncClientConfiguration let serviceName = "AppSync" @@ -86,52 +86,54 @@ public class AppSyncClient: ClientRuntime.Client { } extension AppSyncClient { + public class AppSyncClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension AppSyncClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: AppSyncClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultAppSyncAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultAppSyncAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultAppSyncAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultAppSyncAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultAppSyncAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultAppSyncAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(AppSyncClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSAppTest/Sources/AWSAppTest/AppTestClient.swift b/Sources/Services/AWSAppTest/Sources/AWSAppTest/AppTestClient.swift index cec89f3e3d9..6b329b3ea89 100644 --- a/Sources/Services/AWSAppTest/Sources/AWSAppTest/AppTestClient.swift +++ b/Sources/Services/AWSAppTest/Sources/AWSAppTest/AppTestClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class AppTestClient: ClientRuntime.Client { public static let clientName = "AppTestClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: AppTestClient.AppTestClientConfiguration let serviceName = "AppTest" @@ -87,52 +87,54 @@ public class AppTestClient: ClientRuntime.Client { } extension AppTestClient { + public class AppTestClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension AppTestClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: AppTestClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultAppTestAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultAppTestAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultAppTestAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultAppTestAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultAppTestAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultAppTestAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(AppTestClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSAppflow/Sources/AWSAppflow/AppflowClient.swift b/Sources/Services/AWSAppflow/Sources/AWSAppflow/AppflowClient.swift index 9be50e924d1..c1790b25ea1 100644 --- a/Sources/Services/AWSAppflow/Sources/AWSAppflow/AppflowClient.swift +++ b/Sources/Services/AWSAppflow/Sources/AWSAppflow/AppflowClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class AppflowClient: ClientRuntime.Client { public static let clientName = "AppflowClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: AppflowClient.AppflowClientConfiguration let serviceName = "Appflow" @@ -87,52 +87,54 @@ public class AppflowClient: ClientRuntime.Client { } extension AppflowClient { + public class AppflowClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension AppflowClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: AppflowClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultAppflowAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultAppflowAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultAppflowAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultAppflowAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultAppflowAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultAppflowAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(AppflowClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSApplicationAutoScaling/Sources/AWSApplicationAutoScaling/ApplicationAutoScalingClient.swift b/Sources/Services/AWSApplicationAutoScaling/Sources/AWSApplicationAutoScaling/ApplicationAutoScalingClient.swift index 2bfff8c204b..28a8efa0908 100644 --- a/Sources/Services/AWSApplicationAutoScaling/Sources/AWSApplicationAutoScaling/ApplicationAutoScalingClient.swift +++ b/Sources/Services/AWSApplicationAutoScaling/Sources/AWSApplicationAutoScaling/ApplicationAutoScalingClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ApplicationAutoScalingClient: ClientRuntime.Client { public static let clientName = "ApplicationAutoScalingClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ApplicationAutoScalingClient.ApplicationAutoScalingClientConfiguration let serviceName = "Application Auto Scaling" @@ -86,52 +86,54 @@ public class ApplicationAutoScalingClient: ClientRuntime.Client { } extension ApplicationAutoScalingClient { + public class ApplicationAutoScalingClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension ApplicationAutoScalingClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: ApplicationAutoScalingClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultApplicationAutoScalingAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultApplicationAutoScalingAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultApplicationAutoScalingAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultApplicationAutoScalingAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultApplicationAutoScalingAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultApplicationAutoScalingAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ApplicationAutoScalingClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSApplicationCostProfiler/Sources/AWSApplicationCostProfiler/ApplicationCostProfilerClient.swift b/Sources/Services/AWSApplicationCostProfiler/Sources/AWSApplicationCostProfiler/ApplicationCostProfilerClient.swift index 8bad4c4f038..43f4edc00c1 100644 --- a/Sources/Services/AWSApplicationCostProfiler/Sources/AWSApplicationCostProfiler/ApplicationCostProfilerClient.swift +++ b/Sources/Services/AWSApplicationCostProfiler/Sources/AWSApplicationCostProfiler/ApplicationCostProfilerClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ApplicationCostProfilerClient: ClientRuntime.Client { public static let clientName = "ApplicationCostProfilerClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ApplicationCostProfilerClient.ApplicationCostProfilerClientConfiguration let serviceName = "ApplicationCostProfiler" @@ -86,52 +86,54 @@ public class ApplicationCostProfilerClient: ClientRuntime.Client { } extension ApplicationCostProfilerClient { + public class ApplicationCostProfilerClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension ApplicationCostProfilerClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: ApplicationCostProfilerClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultApplicationCostProfilerAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultApplicationCostProfilerAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultApplicationCostProfilerAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultApplicationCostProfilerAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultApplicationCostProfilerAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultApplicationCostProfilerAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ApplicationCostProfilerClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSApplicationDiscoveryService/Sources/AWSApplicationDiscoveryService/ApplicationDiscoveryClient.swift b/Sources/Services/AWSApplicationDiscoveryService/Sources/AWSApplicationDiscoveryService/ApplicationDiscoveryClient.swift index 05952b1340c..e615c3856d6 100644 --- a/Sources/Services/AWSApplicationDiscoveryService/Sources/AWSApplicationDiscoveryService/ApplicationDiscoveryClient.swift +++ b/Sources/Services/AWSApplicationDiscoveryService/Sources/AWSApplicationDiscoveryService/ApplicationDiscoveryClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ApplicationDiscoveryClient: ClientRuntime.Client { public static let clientName = "ApplicationDiscoveryClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ApplicationDiscoveryClient.ApplicationDiscoveryClientConfiguration let serviceName = "Application Discovery" @@ -87,52 +87,54 @@ public class ApplicationDiscoveryClient: ClientRuntime.Client { } extension ApplicationDiscoveryClient { + public class ApplicationDiscoveryClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension ApplicationDiscoveryClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: ApplicationDiscoveryClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultApplicationDiscoveryServiceAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultApplicationDiscoveryServiceAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultApplicationDiscoveryServiceAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultApplicationDiscoveryServiceAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultApplicationDiscoveryServiceAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultApplicationDiscoveryServiceAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ApplicationDiscoveryClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSApplicationInsights/Sources/AWSApplicationInsights/ApplicationInsightsClient.swift b/Sources/Services/AWSApplicationInsights/Sources/AWSApplicationInsights/ApplicationInsightsClient.swift index 64deeaf2717..d03ceaeaa26 100644 --- a/Sources/Services/AWSApplicationInsights/Sources/AWSApplicationInsights/ApplicationInsightsClient.swift +++ b/Sources/Services/AWSApplicationInsights/Sources/AWSApplicationInsights/ApplicationInsightsClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ApplicationInsightsClient: ClientRuntime.Client { public static let clientName = "ApplicationInsightsClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ApplicationInsightsClient.ApplicationInsightsClientConfiguration let serviceName = "Application Insights" @@ -86,52 +86,54 @@ public class ApplicationInsightsClient: ClientRuntime.Client { } extension ApplicationInsightsClient { + public class ApplicationInsightsClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension ApplicationInsightsClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: ApplicationInsightsClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultApplicationInsightsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultApplicationInsightsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultApplicationInsightsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultApplicationInsightsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultApplicationInsightsAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultApplicationInsightsAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ApplicationInsightsClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSApplicationSignals/Sources/AWSApplicationSignals/ApplicationSignalsClient.swift b/Sources/Services/AWSApplicationSignals/Sources/AWSApplicationSignals/ApplicationSignalsClient.swift index 1afea891fb0..02fbb3e5cf3 100644 --- a/Sources/Services/AWSApplicationSignals/Sources/AWSApplicationSignals/ApplicationSignalsClient.swift +++ b/Sources/Services/AWSApplicationSignals/Sources/AWSApplicationSignals/ApplicationSignalsClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ApplicationSignalsClient: ClientRuntime.Client { public static let clientName = "ApplicationSignalsClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ApplicationSignalsClient.ApplicationSignalsClientConfiguration let serviceName = "Application Signals" @@ -86,52 +86,54 @@ public class ApplicationSignalsClient: ClientRuntime.Client { } extension ApplicationSignalsClient { + public class ApplicationSignalsClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension ApplicationSignalsClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: ApplicationSignalsClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultApplicationSignalsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultApplicationSignalsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultApplicationSignalsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultApplicationSignalsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultApplicationSignalsAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultApplicationSignalsAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ApplicationSignalsClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSArtifact/Sources/AWSArtifact/ArtifactClient.swift b/Sources/Services/AWSArtifact/Sources/AWSArtifact/ArtifactClient.swift index f18cf7dea89..c2bf9b172fa 100644 --- a/Sources/Services/AWSArtifact/Sources/AWSArtifact/ArtifactClient.swift +++ b/Sources/Services/AWSArtifact/Sources/AWSArtifact/ArtifactClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ArtifactClient: ClientRuntime.Client { public static let clientName = "ArtifactClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ArtifactClient.ArtifactClientConfiguration let serviceName = "Artifact" @@ -85,52 +85,54 @@ public class ArtifactClient: ClientRuntime.Client { } extension ArtifactClient { + public class ArtifactClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension ArtifactClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: ArtifactClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultArtifactAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultArtifactAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultArtifactAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultArtifactAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultArtifactAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultArtifactAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ArtifactClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSAthena/Sources/AWSAthena/AthenaClient.swift b/Sources/Services/AWSAthena/Sources/AWSAthena/AthenaClient.swift index 6d620b1a4fe..236493dbb2a 100644 --- a/Sources/Services/AWSAthena/Sources/AWSAthena/AthenaClient.swift +++ b/Sources/Services/AWSAthena/Sources/AWSAthena/AthenaClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class AthenaClient: ClientRuntime.Client { public static let clientName = "AthenaClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: AthenaClient.AthenaClientConfiguration let serviceName = "Athena" @@ -86,52 +86,54 @@ public class AthenaClient: ClientRuntime.Client { } extension AthenaClient { + public class AthenaClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension AthenaClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: AthenaClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultAthenaAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultAthenaAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultAthenaAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultAthenaAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultAthenaAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultAthenaAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(AthenaClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSAuditManager/Sources/AWSAuditManager/AuditManagerClient.swift b/Sources/Services/AWSAuditManager/Sources/AWSAuditManager/AuditManagerClient.swift index 5341a3a85a0..f781ab78904 100644 --- a/Sources/Services/AWSAuditManager/Sources/AWSAuditManager/AuditManagerClient.swift +++ b/Sources/Services/AWSAuditManager/Sources/AWSAuditManager/AuditManagerClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class AuditManagerClient: ClientRuntime.Client { public static let clientName = "AuditManagerClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: AuditManagerClient.AuditManagerClientConfiguration let serviceName = "AuditManager" @@ -85,52 +85,54 @@ public class AuditManagerClient: ClientRuntime.Client { } extension AuditManagerClient { + public class AuditManagerClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension AuditManagerClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: AuditManagerClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultAuditManagerAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultAuditManagerAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultAuditManagerAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultAuditManagerAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultAuditManagerAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultAuditManagerAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(AuditManagerClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSAutoScaling/Sources/AWSAutoScaling/AutoScalingClient.swift b/Sources/Services/AWSAutoScaling/Sources/AWSAutoScaling/AutoScalingClient.swift index ba1061ea709..5de81f6027f 100644 --- a/Sources/Services/AWSAutoScaling/Sources/AWSAutoScaling/AutoScalingClient.swift +++ b/Sources/Services/AWSAutoScaling/Sources/AWSAutoScaling/AutoScalingClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class AutoScalingClient: ClientRuntime.Client { public static let clientName = "AutoScalingClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: AutoScalingClient.AutoScalingClientConfiguration let serviceName = "Auto Scaling" @@ -85,52 +85,54 @@ public class AutoScalingClient: ClientRuntime.Client { } extension AutoScalingClient { + public class AutoScalingClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension AutoScalingClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: AutoScalingClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultAutoScalingAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultAutoScalingAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultAutoScalingAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultAutoScalingAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultAutoScalingAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultAutoScalingAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(AutoScalingClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSAutoScalingPlans/Sources/AWSAutoScalingPlans/AutoScalingPlansClient.swift b/Sources/Services/AWSAutoScalingPlans/Sources/AWSAutoScalingPlans/AutoScalingPlansClient.swift index b2933f9f7aa..ed63a018f58 100644 --- a/Sources/Services/AWSAutoScalingPlans/Sources/AWSAutoScalingPlans/AutoScalingPlansClient.swift +++ b/Sources/Services/AWSAutoScalingPlans/Sources/AWSAutoScalingPlans/AutoScalingPlansClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class AutoScalingPlansClient: ClientRuntime.Client { public static let clientName = "AutoScalingPlansClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: AutoScalingPlansClient.AutoScalingPlansClientConfiguration let serviceName = "Auto Scaling Plans" @@ -86,52 +86,54 @@ public class AutoScalingPlansClient: ClientRuntime.Client { } extension AutoScalingPlansClient { + public class AutoScalingPlansClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension AutoScalingPlansClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: AutoScalingPlansClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultAutoScalingPlansAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultAutoScalingPlansAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultAutoScalingPlansAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultAutoScalingPlansAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultAutoScalingPlansAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultAutoScalingPlansAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(AutoScalingPlansClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSB2bi/Sources/AWSB2bi/B2biClient.swift b/Sources/Services/AWSB2bi/Sources/AWSB2bi/B2biClient.swift index f73410a83e0..59c860e66b7 100644 --- a/Sources/Services/AWSB2bi/Sources/AWSB2bi/B2biClient.swift +++ b/Sources/Services/AWSB2bi/Sources/AWSB2bi/B2biClient.swift @@ -66,7 +66,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class B2biClient: ClientRuntime.Client { public static let clientName = "B2biClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: B2biClient.B2biClientConfiguration let serviceName = "b2bi" @@ -88,52 +88,54 @@ public class B2biClient: ClientRuntime.Client { } extension B2biClient { + public class B2biClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -158,25 +160,158 @@ extension B2biClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: B2biClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultB2biAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultB2biAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultB2biAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultB2biAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultB2biAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultB2biAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(B2biClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSBCMDataExports/Sources/AWSBCMDataExports/BCMDataExportsClient.swift b/Sources/Services/AWSBCMDataExports/Sources/AWSBCMDataExports/BCMDataExportsClient.swift index 728fcabffb4..1b1be7d12f8 100644 --- a/Sources/Services/AWSBCMDataExports/Sources/AWSBCMDataExports/BCMDataExportsClient.swift +++ b/Sources/Services/AWSBCMDataExports/Sources/AWSBCMDataExports/BCMDataExportsClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class BCMDataExportsClient: ClientRuntime.Client { public static let clientName = "BCMDataExportsClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: BCMDataExportsClient.BCMDataExportsClientConfiguration let serviceName = "BCM Data Exports" @@ -85,52 +85,54 @@ public class BCMDataExportsClient: ClientRuntime.Client { } extension BCMDataExportsClient { + public class BCMDataExportsClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension BCMDataExportsClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: BCMDataExportsClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultBCMDataExportsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultBCMDataExportsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultBCMDataExportsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultBCMDataExportsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultBCMDataExportsAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultBCMDataExportsAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(BCMDataExportsClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSBCMPricingCalculator/Sources/AWSBCMPricingCalculator/BCMPricingCalculatorClient.swift b/Sources/Services/AWSBCMPricingCalculator/Sources/AWSBCMPricingCalculator/BCMPricingCalculatorClient.swift index 525b05a1f33..84527b7eda7 100644 --- a/Sources/Services/AWSBCMPricingCalculator/Sources/AWSBCMPricingCalculator/BCMPricingCalculatorClient.swift +++ b/Sources/Services/AWSBCMPricingCalculator/Sources/AWSBCMPricingCalculator/BCMPricingCalculatorClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class BCMPricingCalculatorClient: ClientRuntime.Client { public static let clientName = "BCMPricingCalculatorClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: BCMPricingCalculatorClient.BCMPricingCalculatorClientConfiguration let serviceName = "BCM Pricing Calculator" @@ -87,52 +87,54 @@ public class BCMPricingCalculatorClient: ClientRuntime.Client { } extension BCMPricingCalculatorClient { + public class BCMPricingCalculatorClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension BCMPricingCalculatorClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: BCMPricingCalculatorClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultBCMPricingCalculatorAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultBCMPricingCalculatorAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultBCMPricingCalculatorAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultBCMPricingCalculatorAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultBCMPricingCalculatorAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultBCMPricingCalculatorAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(BCMPricingCalculatorClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSBackup/Sources/AWSBackup/BackupClient.swift b/Sources/Services/AWSBackup/Sources/AWSBackup/BackupClient.swift index 585ced56933..4308b1bc1d0 100644 --- a/Sources/Services/AWSBackup/Sources/AWSBackup/BackupClient.swift +++ b/Sources/Services/AWSBackup/Sources/AWSBackup/BackupClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class BackupClient: ClientRuntime.Client { public static let clientName = "BackupClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: BackupClient.BackupClientConfiguration let serviceName = "Backup" @@ -87,52 +87,54 @@ public class BackupClient: ClientRuntime.Client { } extension BackupClient { + public class BackupClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension BackupClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: BackupClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultBackupAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultBackupAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultBackupAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultBackupAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultBackupAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultBackupAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(BackupClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSBackupGateway/Sources/AWSBackupGateway/BackupGatewayClient.swift b/Sources/Services/AWSBackupGateway/Sources/AWSBackupGateway/BackupGatewayClient.swift index 6f9e23f9b27..546cf44ba9a 100644 --- a/Sources/Services/AWSBackupGateway/Sources/AWSBackupGateway/BackupGatewayClient.swift +++ b/Sources/Services/AWSBackupGateway/Sources/AWSBackupGateway/BackupGatewayClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class BackupGatewayClient: ClientRuntime.Client { public static let clientName = "BackupGatewayClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: BackupGatewayClient.BackupGatewayClientConfiguration let serviceName = "Backup Gateway" @@ -85,52 +85,54 @@ public class BackupGatewayClient: ClientRuntime.Client { } extension BackupGatewayClient { + public class BackupGatewayClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension BackupGatewayClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: BackupGatewayClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultBackupGatewayAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultBackupGatewayAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultBackupGatewayAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultBackupGatewayAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultBackupGatewayAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultBackupGatewayAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(BackupGatewayClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSBatch/Sources/AWSBatch/BatchClient.swift b/Sources/Services/AWSBatch/Sources/AWSBatch/BatchClient.swift index 5504d7d8255..e4b44cd5837 100644 --- a/Sources/Services/AWSBatch/Sources/AWSBatch/BatchClient.swift +++ b/Sources/Services/AWSBatch/Sources/AWSBatch/BatchClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class BatchClient: ClientRuntime.Client { public static let clientName = "BatchClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: BatchClient.BatchClientConfiguration let serviceName = "Batch" @@ -85,52 +85,54 @@ public class BatchClient: ClientRuntime.Client { } extension BatchClient { + public class BatchClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension BatchClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: BatchClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultBatchAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultBatchAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultBatchAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultBatchAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultBatchAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultBatchAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(BatchClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSBedrock/Sources/AWSBedrock/BedrockClient.swift b/Sources/Services/AWSBedrock/Sources/AWSBedrock/BedrockClient.swift index 905d9204301..f2e95c7ead9 100644 --- a/Sources/Services/AWSBedrock/Sources/AWSBedrock/BedrockClient.swift +++ b/Sources/Services/AWSBedrock/Sources/AWSBedrock/BedrockClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class BedrockClient: ClientRuntime.Client { public static let clientName = "BedrockClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: BedrockClient.BedrockClientConfiguration let serviceName = "Bedrock" @@ -87,52 +87,54 @@ public class BedrockClient: ClientRuntime.Client { } extension BedrockClient { + public class BedrockClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension BedrockClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: BedrockClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultBedrockAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultBedrockAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultBedrockAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultBedrockAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultBedrockAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultBedrockAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(BedrockClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSBedrockAgent/Sources/AWSBedrockAgent/BedrockAgentClient.swift b/Sources/Services/AWSBedrockAgent/Sources/AWSBedrockAgent/BedrockAgentClient.swift index 41c854143e3..4ddc536ba2c 100644 --- a/Sources/Services/AWSBedrockAgent/Sources/AWSBedrockAgent/BedrockAgentClient.swift +++ b/Sources/Services/AWSBedrockAgent/Sources/AWSBedrockAgent/BedrockAgentClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class BedrockAgentClient: ClientRuntime.Client { public static let clientName = "BedrockAgentClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: BedrockAgentClient.BedrockAgentClientConfiguration let serviceName = "Bedrock Agent" @@ -87,52 +87,54 @@ public class BedrockAgentClient: ClientRuntime.Client { } extension BedrockAgentClient { + public class BedrockAgentClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension BedrockAgentClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: BedrockAgentClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultBedrockAgentAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultBedrockAgentAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultBedrockAgentAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultBedrockAgentAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultBedrockAgentAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultBedrockAgentAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(BedrockAgentClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSBedrockAgentRuntime/Sources/AWSBedrockAgentRuntime/BedrockAgentRuntimeClient.swift b/Sources/Services/AWSBedrockAgentRuntime/Sources/AWSBedrockAgentRuntime/BedrockAgentRuntimeClient.swift index 0cee7134c5f..fba39095092 100644 --- a/Sources/Services/AWSBedrockAgentRuntime/Sources/AWSBedrockAgentRuntime/BedrockAgentRuntimeClient.swift +++ b/Sources/Services/AWSBedrockAgentRuntime/Sources/AWSBedrockAgentRuntime/BedrockAgentRuntimeClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class BedrockAgentRuntimeClient: ClientRuntime.Client { public static let clientName = "BedrockAgentRuntimeClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: BedrockAgentRuntimeClient.BedrockAgentRuntimeClientConfiguration let serviceName = "Bedrock Agent Runtime" @@ -86,52 +86,54 @@ public class BedrockAgentRuntimeClient: ClientRuntime.Client { } extension BedrockAgentRuntimeClient { + public class BedrockAgentRuntimeClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension BedrockAgentRuntimeClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: BedrockAgentRuntimeClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultBedrockAgentRuntimeAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultBedrockAgentRuntimeAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultBedrockAgentRuntimeAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultBedrockAgentRuntimeAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultBedrockAgentRuntimeAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultBedrockAgentRuntimeAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(BedrockAgentRuntimeClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSBedrockRuntime/Sources/AWSBedrockRuntime/BedrockRuntimeClient.swift b/Sources/Services/AWSBedrockRuntime/Sources/AWSBedrockRuntime/BedrockRuntimeClient.swift index befd3cfb77e..11be1767a3f 100644 --- a/Sources/Services/AWSBedrockRuntime/Sources/AWSBedrockRuntime/BedrockRuntimeClient.swift +++ b/Sources/Services/AWSBedrockRuntime/Sources/AWSBedrockRuntime/BedrockRuntimeClient.swift @@ -69,7 +69,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class BedrockRuntimeClient: ClientRuntime.Client { public static let clientName = "BedrockRuntimeClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: BedrockRuntimeClient.BedrockRuntimeClientConfiguration let serviceName = "Bedrock Runtime" @@ -91,52 +91,54 @@ public class BedrockRuntimeClient: ClientRuntime.Client { } extension BedrockRuntimeClient { + public class BedrockRuntimeClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -161,25 +163,158 @@ extension BedrockRuntimeClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: BedrockRuntimeClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultBedrockRuntimeAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultBedrockRuntimeAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultBedrockRuntimeAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultBedrockRuntimeAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultBedrockRuntimeAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultBedrockRuntimeAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(BedrockRuntimeClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSBilling/Sources/AWSBilling/BillingClient.swift b/Sources/Services/AWSBilling/Sources/AWSBilling/BillingClient.swift index 853b4d8866c..a2773b0806d 100644 --- a/Sources/Services/AWSBilling/Sources/AWSBilling/BillingClient.swift +++ b/Sources/Services/AWSBilling/Sources/AWSBilling/BillingClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class BillingClient: ClientRuntime.Client { public static let clientName = "BillingClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: BillingClient.BillingClientConfiguration let serviceName = "Billing" @@ -85,52 +85,54 @@ public class BillingClient: ClientRuntime.Client { } extension BillingClient { + public class BillingClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension BillingClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: BillingClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultBillingAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultBillingAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultBillingAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultBillingAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultBillingAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultBillingAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(BillingClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSBillingconductor/Sources/AWSBillingconductor/BillingconductorClient.swift b/Sources/Services/AWSBillingconductor/Sources/AWSBillingconductor/BillingconductorClient.swift index c64930df77c..72fac9be24e 100644 --- a/Sources/Services/AWSBillingconductor/Sources/AWSBillingconductor/BillingconductorClient.swift +++ b/Sources/Services/AWSBillingconductor/Sources/AWSBillingconductor/BillingconductorClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class BillingconductorClient: ClientRuntime.Client { public static let clientName = "BillingconductorClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: BillingconductorClient.BillingconductorClientConfiguration let serviceName = "billingconductor" @@ -87,52 +87,54 @@ public class BillingconductorClient: ClientRuntime.Client { } extension BillingconductorClient { + public class BillingconductorClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension BillingconductorClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: BillingconductorClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultBillingconductorAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultBillingconductorAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultBillingconductorAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultBillingconductorAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultBillingconductorAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultBillingconductorAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(BillingconductorClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSBraket/Sources/AWSBraket/BraketClient.swift b/Sources/Services/AWSBraket/Sources/AWSBraket/BraketClient.swift index 191ad5304b5..3fcf97ca945 100644 --- a/Sources/Services/AWSBraket/Sources/AWSBraket/BraketClient.swift +++ b/Sources/Services/AWSBraket/Sources/AWSBraket/BraketClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class BraketClient: ClientRuntime.Client { public static let clientName = "BraketClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: BraketClient.BraketClientConfiguration let serviceName = "Braket" @@ -87,52 +87,54 @@ public class BraketClient: ClientRuntime.Client { } extension BraketClient { + public class BraketClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension BraketClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: BraketClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultBraketAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultBraketAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultBraketAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultBraketAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultBraketAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultBraketAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(BraketClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSBudgets/Sources/AWSBudgets/BudgetsClient.swift b/Sources/Services/AWSBudgets/Sources/AWSBudgets/BudgetsClient.swift index eac706fe43c..bd8309392a5 100644 --- a/Sources/Services/AWSBudgets/Sources/AWSBudgets/BudgetsClient.swift +++ b/Sources/Services/AWSBudgets/Sources/AWSBudgets/BudgetsClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class BudgetsClient: ClientRuntime.Client { public static let clientName = "BudgetsClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: BudgetsClient.BudgetsClientConfiguration let serviceName = "Budgets" @@ -85,52 +85,54 @@ public class BudgetsClient: ClientRuntime.Client { } extension BudgetsClient { + public class BudgetsClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension BudgetsClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: BudgetsClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultBudgetsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultBudgetsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultBudgetsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultBudgetsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultBudgetsAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultBudgetsAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(BudgetsClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSChatbot/Sources/AWSChatbot/ChatbotClient.swift b/Sources/Services/AWSChatbot/Sources/AWSChatbot/ChatbotClient.swift index b38599ec6ea..fdf3bcc945b 100644 --- a/Sources/Services/AWSChatbot/Sources/AWSChatbot/ChatbotClient.swift +++ b/Sources/Services/AWSChatbot/Sources/AWSChatbot/ChatbotClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ChatbotClient: ClientRuntime.Client { public static let clientName = "ChatbotClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ChatbotClient.ChatbotClientConfiguration let serviceName = "chatbot" @@ -85,52 +85,54 @@ public class ChatbotClient: ClientRuntime.Client { } extension ChatbotClient { + public class ChatbotClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension ChatbotClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: ChatbotClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultChatbotAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultChatbotAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultChatbotAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultChatbotAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultChatbotAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultChatbotAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ChatbotClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSChime/Sources/AWSChime/ChimeClient.swift b/Sources/Services/AWSChime/Sources/AWSChime/ChimeClient.swift index 510d4a643e4..373f8dfb36d 100644 --- a/Sources/Services/AWSChime/Sources/AWSChime/ChimeClient.swift +++ b/Sources/Services/AWSChime/Sources/AWSChime/ChimeClient.swift @@ -66,7 +66,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ChimeClient: ClientRuntime.Client { public static let clientName = "ChimeClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ChimeClient.ChimeClientConfiguration let serviceName = "Chime" @@ -88,52 +88,54 @@ public class ChimeClient: ClientRuntime.Client { } extension ChimeClient { + public class ChimeClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -158,25 +160,158 @@ extension ChimeClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: ChimeClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultChimeAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultChimeAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultChimeAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultChimeAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultChimeAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultChimeAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ChimeClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSChimeSDKIdentity/Sources/AWSChimeSDKIdentity/ChimeSDKIdentityClient.swift b/Sources/Services/AWSChimeSDKIdentity/Sources/AWSChimeSDKIdentity/ChimeSDKIdentityClient.swift index 0557c0973c3..09e632cc2b1 100644 --- a/Sources/Services/AWSChimeSDKIdentity/Sources/AWSChimeSDKIdentity/ChimeSDKIdentityClient.swift +++ b/Sources/Services/AWSChimeSDKIdentity/Sources/AWSChimeSDKIdentity/ChimeSDKIdentityClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ChimeSDKIdentityClient: ClientRuntime.Client { public static let clientName = "ChimeSDKIdentityClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ChimeSDKIdentityClient.ChimeSDKIdentityClientConfiguration let serviceName = "Chime SDK Identity" @@ -87,52 +87,54 @@ public class ChimeSDKIdentityClient: ClientRuntime.Client { } extension ChimeSDKIdentityClient { + public class ChimeSDKIdentityClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension ChimeSDKIdentityClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: ChimeSDKIdentityClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultChimeSDKIdentityAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultChimeSDKIdentityAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultChimeSDKIdentityAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultChimeSDKIdentityAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultChimeSDKIdentityAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultChimeSDKIdentityAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ChimeSDKIdentityClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSChimeSDKMediaPipelines/Sources/AWSChimeSDKMediaPipelines/ChimeSDKMediaPipelinesClient.swift b/Sources/Services/AWSChimeSDKMediaPipelines/Sources/AWSChimeSDKMediaPipelines/ChimeSDKMediaPipelinesClient.swift index 4a5d976acef..0fa450c0501 100644 --- a/Sources/Services/AWSChimeSDKMediaPipelines/Sources/AWSChimeSDKMediaPipelines/ChimeSDKMediaPipelinesClient.swift +++ b/Sources/Services/AWSChimeSDKMediaPipelines/Sources/AWSChimeSDKMediaPipelines/ChimeSDKMediaPipelinesClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ChimeSDKMediaPipelinesClient: ClientRuntime.Client { public static let clientName = "ChimeSDKMediaPipelinesClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ChimeSDKMediaPipelinesClient.ChimeSDKMediaPipelinesClientConfiguration let serviceName = "Chime SDK Media Pipelines" @@ -86,52 +86,54 @@ public class ChimeSDKMediaPipelinesClient: ClientRuntime.Client { } extension ChimeSDKMediaPipelinesClient { + public class ChimeSDKMediaPipelinesClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension ChimeSDKMediaPipelinesClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: ChimeSDKMediaPipelinesClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultChimeSDKMediaPipelinesAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultChimeSDKMediaPipelinesAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultChimeSDKMediaPipelinesAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultChimeSDKMediaPipelinesAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultChimeSDKMediaPipelinesAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultChimeSDKMediaPipelinesAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ChimeSDKMediaPipelinesClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSChimeSDKMeetings/Sources/AWSChimeSDKMeetings/ChimeSDKMeetingsClient.swift b/Sources/Services/AWSChimeSDKMeetings/Sources/AWSChimeSDKMeetings/ChimeSDKMeetingsClient.swift index 541d37d3f92..9f9b727b3e1 100644 --- a/Sources/Services/AWSChimeSDKMeetings/Sources/AWSChimeSDKMeetings/ChimeSDKMeetingsClient.swift +++ b/Sources/Services/AWSChimeSDKMeetings/Sources/AWSChimeSDKMeetings/ChimeSDKMeetingsClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ChimeSDKMeetingsClient: ClientRuntime.Client { public static let clientName = "ChimeSDKMeetingsClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ChimeSDKMeetingsClient.ChimeSDKMeetingsClientConfiguration let serviceName = "Chime SDK Meetings" @@ -86,52 +86,54 @@ public class ChimeSDKMeetingsClient: ClientRuntime.Client { } extension ChimeSDKMeetingsClient { + public class ChimeSDKMeetingsClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension ChimeSDKMeetingsClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: ChimeSDKMeetingsClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultChimeSDKMeetingsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultChimeSDKMeetingsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultChimeSDKMeetingsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultChimeSDKMeetingsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultChimeSDKMeetingsAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultChimeSDKMeetingsAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ChimeSDKMeetingsClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSChimeSDKMessaging/Sources/AWSChimeSDKMessaging/ChimeSDKMessagingClient.swift b/Sources/Services/AWSChimeSDKMessaging/Sources/AWSChimeSDKMessaging/ChimeSDKMessagingClient.swift index 2d326b8411f..80c1a761d9b 100644 --- a/Sources/Services/AWSChimeSDKMessaging/Sources/AWSChimeSDKMessaging/ChimeSDKMessagingClient.swift +++ b/Sources/Services/AWSChimeSDKMessaging/Sources/AWSChimeSDKMessaging/ChimeSDKMessagingClient.swift @@ -66,7 +66,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ChimeSDKMessagingClient: ClientRuntime.Client { public static let clientName = "ChimeSDKMessagingClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ChimeSDKMessagingClient.ChimeSDKMessagingClientConfiguration let serviceName = "Chime SDK Messaging" @@ -88,52 +88,54 @@ public class ChimeSDKMessagingClient: ClientRuntime.Client { } extension ChimeSDKMessagingClient { + public class ChimeSDKMessagingClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -158,25 +160,158 @@ extension ChimeSDKMessagingClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: ChimeSDKMessagingClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultChimeSDKMessagingAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultChimeSDKMessagingAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultChimeSDKMessagingAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultChimeSDKMessagingAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultChimeSDKMessagingAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultChimeSDKMessagingAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ChimeSDKMessagingClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSChimeSDKVoice/Sources/AWSChimeSDKVoice/ChimeSDKVoiceClient.swift b/Sources/Services/AWSChimeSDKVoice/Sources/AWSChimeSDKVoice/ChimeSDKVoiceClient.swift index 0f16b813e3c..32ec7d634ff 100644 --- a/Sources/Services/AWSChimeSDKVoice/Sources/AWSChimeSDKVoice/ChimeSDKVoiceClient.swift +++ b/Sources/Services/AWSChimeSDKVoice/Sources/AWSChimeSDKVoice/ChimeSDKVoiceClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ChimeSDKVoiceClient: ClientRuntime.Client { public static let clientName = "ChimeSDKVoiceClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ChimeSDKVoiceClient.ChimeSDKVoiceClientConfiguration let serviceName = "Chime SDK Voice" @@ -86,52 +86,54 @@ public class ChimeSDKVoiceClient: ClientRuntime.Client { } extension ChimeSDKVoiceClient { + public class ChimeSDKVoiceClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension ChimeSDKVoiceClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: ChimeSDKVoiceClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultChimeSDKVoiceAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultChimeSDKVoiceAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultChimeSDKVoiceAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultChimeSDKVoiceAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultChimeSDKVoiceAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultChimeSDKVoiceAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ChimeSDKVoiceClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSCleanRooms/Sources/AWSCleanRooms/CleanRoomsClient.swift b/Sources/Services/AWSCleanRooms/Sources/AWSCleanRooms/CleanRoomsClient.swift index 02785ca532e..69c89125af7 100644 --- a/Sources/Services/AWSCleanRooms/Sources/AWSCleanRooms/CleanRoomsClient.swift +++ b/Sources/Services/AWSCleanRooms/Sources/AWSCleanRooms/CleanRoomsClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class CleanRoomsClient: ClientRuntime.Client { public static let clientName = "CleanRoomsClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: CleanRoomsClient.CleanRoomsClientConfiguration let serviceName = "CleanRooms" @@ -85,52 +85,54 @@ public class CleanRoomsClient: ClientRuntime.Client { } extension CleanRoomsClient { + public class CleanRoomsClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension CleanRoomsClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: CleanRoomsClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCleanRoomsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCleanRoomsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCleanRoomsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCleanRoomsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultCleanRoomsAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultCleanRoomsAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(CleanRoomsClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSCleanRoomsML/Sources/AWSCleanRoomsML/CleanRoomsMLClient.swift b/Sources/Services/AWSCleanRoomsML/Sources/AWSCleanRoomsML/CleanRoomsMLClient.swift index c69e6574642..4d69c255d07 100644 --- a/Sources/Services/AWSCleanRoomsML/Sources/AWSCleanRoomsML/CleanRoomsMLClient.swift +++ b/Sources/Services/AWSCleanRoomsML/Sources/AWSCleanRoomsML/CleanRoomsMLClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class CleanRoomsMLClient: ClientRuntime.Client { public static let clientName = "CleanRoomsMLClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: CleanRoomsMLClient.CleanRoomsMLClientConfiguration let serviceName = "CleanRoomsML" @@ -86,52 +86,54 @@ public class CleanRoomsMLClient: ClientRuntime.Client { } extension CleanRoomsMLClient { + public class CleanRoomsMLClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension CleanRoomsMLClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: CleanRoomsMLClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCleanRoomsMLAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCleanRoomsMLAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCleanRoomsMLAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCleanRoomsMLAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultCleanRoomsMLAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultCleanRoomsMLAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(CleanRoomsMLClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSCloud9/Sources/AWSCloud9/Cloud9Client.swift b/Sources/Services/AWSCloud9/Sources/AWSCloud9/Cloud9Client.swift index e40fe7aa3f7..dd6290aeb1c 100644 --- a/Sources/Services/AWSCloud9/Sources/AWSCloud9/Cloud9Client.swift +++ b/Sources/Services/AWSCloud9/Sources/AWSCloud9/Cloud9Client.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class Cloud9Client: ClientRuntime.Client { public static let clientName = "Cloud9Client" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: Cloud9Client.Cloud9ClientConfiguration let serviceName = "Cloud9" @@ -85,52 +85,54 @@ public class Cloud9Client: ClientRuntime.Client { } extension Cloud9Client { + public class Cloud9ClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension Cloud9Client { self.logger = telemetryProvider.loggerProvider.getLogger(name: Cloud9Client.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCloud9AuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCloud9AuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCloud9AuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCloud9AuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultCloud9AuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultCloud9AuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(Cloud9Client.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSCloudControl/Sources/AWSCloudControl/CloudControlClient.swift b/Sources/Services/AWSCloudControl/Sources/AWSCloudControl/CloudControlClient.swift index 0d13babeca5..fe9ac4b71ad 100644 --- a/Sources/Services/AWSCloudControl/Sources/AWSCloudControl/CloudControlClient.swift +++ b/Sources/Services/AWSCloudControl/Sources/AWSCloudControl/CloudControlClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class CloudControlClient: ClientRuntime.Client { public static let clientName = "CloudControlClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: CloudControlClient.CloudControlClientConfiguration let serviceName = "CloudControl" @@ -86,52 +86,54 @@ public class CloudControlClient: ClientRuntime.Client { } extension CloudControlClient { + public class CloudControlClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension CloudControlClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: CloudControlClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCloudControlAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCloudControlAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCloudControlAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCloudControlAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultCloudControlAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultCloudControlAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(CloudControlClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSCloudDirectory/Sources/AWSCloudDirectory/CloudDirectoryClient.swift b/Sources/Services/AWSCloudDirectory/Sources/AWSCloudDirectory/CloudDirectoryClient.swift index 17fd4cd3f06..42f629ddaa4 100644 --- a/Sources/Services/AWSCloudDirectory/Sources/AWSCloudDirectory/CloudDirectoryClient.swift +++ b/Sources/Services/AWSCloudDirectory/Sources/AWSCloudDirectory/CloudDirectoryClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class CloudDirectoryClient: ClientRuntime.Client { public static let clientName = "CloudDirectoryClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: CloudDirectoryClient.CloudDirectoryClientConfiguration let serviceName = "CloudDirectory" @@ -85,52 +85,54 @@ public class CloudDirectoryClient: ClientRuntime.Client { } extension CloudDirectoryClient { + public class CloudDirectoryClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension CloudDirectoryClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: CloudDirectoryClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCloudDirectoryAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCloudDirectoryAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCloudDirectoryAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCloudDirectoryAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultCloudDirectoryAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultCloudDirectoryAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(CloudDirectoryClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSCloudFormation/Sources/AWSCloudFormation/CloudFormationClient.swift b/Sources/Services/AWSCloudFormation/Sources/AWSCloudFormation/CloudFormationClient.swift index 33f01c9f2ed..db35da546e9 100644 --- a/Sources/Services/AWSCloudFormation/Sources/AWSCloudFormation/CloudFormationClient.swift +++ b/Sources/Services/AWSCloudFormation/Sources/AWSCloudFormation/CloudFormationClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class CloudFormationClient: ClientRuntime.Client { public static let clientName = "CloudFormationClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: CloudFormationClient.CloudFormationClientConfiguration let serviceName = "CloudFormation" @@ -86,52 +86,54 @@ public class CloudFormationClient: ClientRuntime.Client { } extension CloudFormationClient { + public class CloudFormationClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension CloudFormationClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: CloudFormationClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCloudFormationAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCloudFormationAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCloudFormationAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCloudFormationAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultCloudFormationAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultCloudFormationAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(CloudFormationClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSCloudFront/Sources/AWSCloudFront/CloudFrontClient.swift b/Sources/Services/AWSCloudFront/Sources/AWSCloudFront/CloudFrontClient.swift index 4f95976c730..ffe9785254b 100644 --- a/Sources/Services/AWSCloudFront/Sources/AWSCloudFront/CloudFrontClient.swift +++ b/Sources/Services/AWSCloudFront/Sources/AWSCloudFront/CloudFrontClient.swift @@ -66,7 +66,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class CloudFrontClient: ClientRuntime.Client { public static let clientName = "CloudFrontClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: CloudFrontClient.CloudFrontClientConfiguration let serviceName = "CloudFront" @@ -88,52 +88,54 @@ public class CloudFrontClient: ClientRuntime.Client { } extension CloudFrontClient { + public class CloudFrontClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -158,25 +160,158 @@ extension CloudFrontClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: CloudFrontClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCloudFrontAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCloudFrontAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCloudFrontAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCloudFrontAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultCloudFrontAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultCloudFrontAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(CloudFrontClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSCloudFrontKeyValueStore/Sources/AWSCloudFrontKeyValueStore/CloudFrontKeyValueStoreClient.swift b/Sources/Services/AWSCloudFrontKeyValueStore/Sources/AWSCloudFrontKeyValueStore/CloudFrontKeyValueStoreClient.swift index d9190683dc1..a7a7dcbc253 100644 --- a/Sources/Services/AWSCloudFrontKeyValueStore/Sources/AWSCloudFrontKeyValueStore/CloudFrontKeyValueStoreClient.swift +++ b/Sources/Services/AWSCloudFrontKeyValueStore/Sources/AWSCloudFrontKeyValueStore/CloudFrontKeyValueStoreClient.swift @@ -67,7 +67,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class CloudFrontKeyValueStoreClient: ClientRuntime.Client { public static let clientName = "CloudFrontKeyValueStoreClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: CloudFrontKeyValueStoreClient.CloudFrontKeyValueStoreClientConfiguration let serviceName = "CloudFront KeyValueStore" @@ -89,52 +89,54 @@ public class CloudFrontKeyValueStoreClient: ClientRuntime.Client { } extension CloudFrontKeyValueStoreClient { + public class CloudFrontKeyValueStoreClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -159,25 +161,158 @@ extension CloudFrontKeyValueStoreClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: CloudFrontKeyValueStoreClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme(), AWSSDKHTTPAuth.SigV4AAuthScheme()], authSchemeResolver ?? DefaultCloudFrontKeyValueStoreAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme(), AWSSDKHTTPAuth.SigV4AAuthScheme()], + authSchemeResolver ?? DefaultCloudFrontKeyValueStoreAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme(), AWSSDKHTTPAuth.SigV4AAuthScheme()], authSchemeResolver ?? DefaultCloudFrontKeyValueStoreAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme(), AWSSDKHTTPAuth.SigV4AAuthScheme()], + authSchemeResolver ?? DefaultCloudFrontKeyValueStoreAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme(), AWSSDKHTTPAuth.SigV4AAuthScheme()], DefaultCloudFrontKeyValueStoreAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme(), AWSSDKHTTPAuth.SigV4AAuthScheme()], + DefaultCloudFrontKeyValueStoreAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(CloudFrontKeyValueStoreClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSCloudHSM/Sources/AWSCloudHSM/CloudHSMClient.swift b/Sources/Services/AWSCloudHSM/Sources/AWSCloudHSM/CloudHSMClient.swift index 552dd610c53..f674c16cfab 100644 --- a/Sources/Services/AWSCloudHSM/Sources/AWSCloudHSM/CloudHSMClient.swift +++ b/Sources/Services/AWSCloudHSM/Sources/AWSCloudHSM/CloudHSMClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class CloudHSMClient: ClientRuntime.Client { public static let clientName = "CloudHSMClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: CloudHSMClient.CloudHSMClientConfiguration let serviceName = "CloudHSM" @@ -85,52 +85,54 @@ public class CloudHSMClient: ClientRuntime.Client { } extension CloudHSMClient { + public class CloudHSMClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension CloudHSMClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: CloudHSMClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCloudHSMAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCloudHSMAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCloudHSMAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCloudHSMAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultCloudHSMAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultCloudHSMAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(CloudHSMClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSCloudHSMV2/Sources/AWSCloudHSMV2/CloudHSMV2Client.swift b/Sources/Services/AWSCloudHSMV2/Sources/AWSCloudHSMV2/CloudHSMV2Client.swift index 02cd8d13849..596ebf51c78 100644 --- a/Sources/Services/AWSCloudHSMV2/Sources/AWSCloudHSMV2/CloudHSMV2Client.swift +++ b/Sources/Services/AWSCloudHSMV2/Sources/AWSCloudHSMV2/CloudHSMV2Client.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class CloudHSMV2Client: ClientRuntime.Client { public static let clientName = "CloudHSMV2Client" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: CloudHSMV2Client.CloudHSMV2ClientConfiguration let serviceName = "CloudHSM V2" @@ -85,52 +85,54 @@ public class CloudHSMV2Client: ClientRuntime.Client { } extension CloudHSMV2Client { + public class CloudHSMV2ClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension CloudHSMV2Client { self.logger = telemetryProvider.loggerProvider.getLogger(name: CloudHSMV2Client.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCloudHSMV2AuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCloudHSMV2AuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCloudHSMV2AuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCloudHSMV2AuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultCloudHSMV2AuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultCloudHSMV2AuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(CloudHSMV2Client.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSCloudSearch/Sources/AWSCloudSearch/CloudSearchClient.swift b/Sources/Services/AWSCloudSearch/Sources/AWSCloudSearch/CloudSearchClient.swift index 559cbf85539..9e088eeb2d7 100644 --- a/Sources/Services/AWSCloudSearch/Sources/AWSCloudSearch/CloudSearchClient.swift +++ b/Sources/Services/AWSCloudSearch/Sources/AWSCloudSearch/CloudSearchClient.swift @@ -62,7 +62,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class CloudSearchClient: ClientRuntime.Client { public static let clientName = "CloudSearchClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: CloudSearchClient.CloudSearchClientConfiguration let serviceName = "CloudSearch" @@ -84,52 +84,54 @@ public class CloudSearchClient: ClientRuntime.Client { } extension CloudSearchClient { + public class CloudSearchClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -154,25 +156,158 @@ extension CloudSearchClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: CloudSearchClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCloudSearchAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCloudSearchAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCloudSearchAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCloudSearchAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultCloudSearchAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultCloudSearchAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(CloudSearchClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSCloudSearchDomain/Sources/AWSCloudSearchDomain/CloudSearchDomainClient.swift b/Sources/Services/AWSCloudSearchDomain/Sources/AWSCloudSearchDomain/CloudSearchDomainClient.swift index 4470ea27889..252f080948d 100644 --- a/Sources/Services/AWSCloudSearchDomain/Sources/AWSCloudSearchDomain/CloudSearchDomainClient.swift +++ b/Sources/Services/AWSCloudSearchDomain/Sources/AWSCloudSearchDomain/CloudSearchDomainClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class CloudSearchDomainClient: ClientRuntime.Client { public static let clientName = "CloudSearchDomainClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: CloudSearchDomainClient.CloudSearchDomainClientConfiguration let serviceName = "CloudSearch Domain" @@ -86,52 +86,54 @@ public class CloudSearchDomainClient: ClientRuntime.Client { } extension CloudSearchDomainClient { + public class CloudSearchDomainClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension CloudSearchDomainClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: CloudSearchDomainClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCloudSearchDomainAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCloudSearchDomainAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCloudSearchDomainAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCloudSearchDomainAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultCloudSearchDomainAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultCloudSearchDomainAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(CloudSearchDomainClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSCloudTrail/Sources/AWSCloudTrail/CloudTrailClient.swift b/Sources/Services/AWSCloudTrail/Sources/AWSCloudTrail/CloudTrailClient.swift index f122832d58f..97358404e9a 100644 --- a/Sources/Services/AWSCloudTrail/Sources/AWSCloudTrail/CloudTrailClient.swift +++ b/Sources/Services/AWSCloudTrail/Sources/AWSCloudTrail/CloudTrailClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class CloudTrailClient: ClientRuntime.Client { public static let clientName = "CloudTrailClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: CloudTrailClient.CloudTrailClientConfiguration let serviceName = "CloudTrail" @@ -86,52 +86,54 @@ public class CloudTrailClient: ClientRuntime.Client { } extension CloudTrailClient { + public class CloudTrailClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension CloudTrailClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: CloudTrailClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCloudTrailAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCloudTrailAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCloudTrailAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCloudTrailAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultCloudTrailAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultCloudTrailAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(CloudTrailClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSCloudTrailData/Sources/AWSCloudTrailData/CloudTrailDataClient.swift b/Sources/Services/AWSCloudTrailData/Sources/AWSCloudTrailData/CloudTrailDataClient.swift index fce1528b526..934585623de 100644 --- a/Sources/Services/AWSCloudTrailData/Sources/AWSCloudTrailData/CloudTrailDataClient.swift +++ b/Sources/Services/AWSCloudTrailData/Sources/AWSCloudTrailData/CloudTrailDataClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class CloudTrailDataClient: ClientRuntime.Client { public static let clientName = "CloudTrailDataClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: CloudTrailDataClient.CloudTrailDataClientConfiguration let serviceName = "CloudTrail Data" @@ -85,52 +85,54 @@ public class CloudTrailDataClient: ClientRuntime.Client { } extension CloudTrailDataClient { + public class CloudTrailDataClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension CloudTrailDataClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: CloudTrailDataClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCloudTrailDataAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCloudTrailDataAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCloudTrailDataAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCloudTrailDataAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultCloudTrailDataAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultCloudTrailDataAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(CloudTrailDataClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSCloudWatch/Sources/AWSCloudWatch/CloudWatchClient.swift b/Sources/Services/AWSCloudWatch/Sources/AWSCloudWatch/CloudWatchClient.swift index 03fc7279a56..13d4e3a545b 100644 --- a/Sources/Services/AWSCloudWatch/Sources/AWSCloudWatch/CloudWatchClient.swift +++ b/Sources/Services/AWSCloudWatch/Sources/AWSCloudWatch/CloudWatchClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class CloudWatchClient: ClientRuntime.Client { public static let clientName = "CloudWatchClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: CloudWatchClient.CloudWatchClientConfiguration let serviceName = "CloudWatch" @@ -85,52 +85,54 @@ public class CloudWatchClient: ClientRuntime.Client { } extension CloudWatchClient { + public class CloudWatchClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension CloudWatchClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: CloudWatchClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCloudWatchAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCloudWatchAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCloudWatchAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCloudWatchAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultCloudWatchAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultCloudWatchAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(CloudWatchClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSCloudWatchEvents/Sources/AWSCloudWatchEvents/CloudWatchEventsClient.swift b/Sources/Services/AWSCloudWatchEvents/Sources/AWSCloudWatchEvents/CloudWatchEventsClient.swift index 6fa5cab0d3c..2d1925d3312 100644 --- a/Sources/Services/AWSCloudWatchEvents/Sources/AWSCloudWatchEvents/CloudWatchEventsClient.swift +++ b/Sources/Services/AWSCloudWatchEvents/Sources/AWSCloudWatchEvents/CloudWatchEventsClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class CloudWatchEventsClient: ClientRuntime.Client { public static let clientName = "CloudWatchEventsClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: CloudWatchEventsClient.CloudWatchEventsClientConfiguration let serviceName = "CloudWatch Events" @@ -86,52 +86,54 @@ public class CloudWatchEventsClient: ClientRuntime.Client { } extension CloudWatchEventsClient { + public class CloudWatchEventsClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension CloudWatchEventsClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: CloudWatchEventsClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCloudWatchEventsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCloudWatchEventsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCloudWatchEventsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCloudWatchEventsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultCloudWatchEventsAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultCloudWatchEventsAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(CloudWatchEventsClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSCloudWatchLogs/Sources/AWSCloudWatchLogs/CloudWatchLogsClient.swift b/Sources/Services/AWSCloudWatchLogs/Sources/AWSCloudWatchLogs/CloudWatchLogsClient.swift index 3902ba9f204..5bad346673e 100644 --- a/Sources/Services/AWSCloudWatchLogs/Sources/AWSCloudWatchLogs/CloudWatchLogsClient.swift +++ b/Sources/Services/AWSCloudWatchLogs/Sources/AWSCloudWatchLogs/CloudWatchLogsClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class CloudWatchLogsClient: ClientRuntime.Client { public static let clientName = "CloudWatchLogsClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: CloudWatchLogsClient.CloudWatchLogsClientConfiguration let serviceName = "CloudWatch Logs" @@ -86,52 +86,54 @@ public class CloudWatchLogsClient: ClientRuntime.Client { } extension CloudWatchLogsClient { + public class CloudWatchLogsClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension CloudWatchLogsClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: CloudWatchLogsClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCloudWatchLogsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCloudWatchLogsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCloudWatchLogsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCloudWatchLogsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultCloudWatchLogsAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultCloudWatchLogsAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(CloudWatchLogsClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSCodeBuild/Sources/AWSCodeBuild/CodeBuildClient.swift b/Sources/Services/AWSCodeBuild/Sources/AWSCodeBuild/CodeBuildClient.swift index acca60255e0..ecf837bae63 100644 --- a/Sources/Services/AWSCodeBuild/Sources/AWSCodeBuild/CodeBuildClient.swift +++ b/Sources/Services/AWSCodeBuild/Sources/AWSCodeBuild/CodeBuildClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class CodeBuildClient: ClientRuntime.Client { public static let clientName = "CodeBuildClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: CodeBuildClient.CodeBuildClientConfiguration let serviceName = "CodeBuild" @@ -85,52 +85,54 @@ public class CodeBuildClient: ClientRuntime.Client { } extension CodeBuildClient { + public class CodeBuildClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension CodeBuildClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: CodeBuildClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCodeBuildAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCodeBuildAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCodeBuildAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCodeBuildAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultCodeBuildAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultCodeBuildAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(CodeBuildClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSCodeCatalyst/Sources/AWSCodeCatalyst/CodeCatalystClient.swift b/Sources/Services/AWSCodeCatalyst/Sources/AWSCodeCatalyst/CodeCatalystClient.swift index aa17337abad..37e94b01699 100644 --- a/Sources/Services/AWSCodeCatalyst/Sources/AWSCodeCatalyst/CodeCatalystClient.swift +++ b/Sources/Services/AWSCodeCatalyst/Sources/AWSCodeCatalyst/CodeCatalystClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class CodeCatalystClient: ClientRuntime.Client { public static let clientName = "CodeCatalystClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: CodeCatalystClient.CodeCatalystClientConfiguration let serviceName = "CodeCatalyst" @@ -86,52 +86,54 @@ public class CodeCatalystClient: ClientRuntime.Client { } extension CodeCatalystClient { + public class CodeCatalystClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension CodeCatalystClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: CodeCatalystClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [SmithyHTTPAuth.BearerTokenAuthScheme()], authSchemeResolver ?? DefaultCodeCatalystAuthSchemeResolver(), try bearerTokenIdentityResolver ?? AWSSDKIdentity.DefaultBearerTokenIdentityResolverChain(), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [SmithyHTTPAuth.BearerTokenAuthScheme()], authSchemeResolver ?? DefaultCodeCatalystAuthSchemeResolver(), try bearerTokenIdentityResolver ?? AWSSDKIdentity.DefaultBearerTokenIdentityResolverChain(), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [SmithyHTTPAuth.BearerTokenAuthScheme()], + authSchemeResolver ?? DefaultCodeCatalystAuthSchemeResolver(), + try bearerTokenIdentityResolver ?? AWSSDKIdentity.DefaultBearerTokenIdentityResolverChain(), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [SmithyHTTPAuth.BearerTokenAuthScheme()], + authSchemeResolver ?? DefaultCodeCatalystAuthSchemeResolver(), + try bearerTokenIdentityResolver ?? AWSSDKIdentity.DefaultBearerTokenIdentityResolverChain(), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [SmithyHTTPAuth.BearerTokenAuthScheme()], DefaultCodeCatalystAuthSchemeResolver(), try AWSSDKIdentity.DefaultBearerTokenIdentityResolverChain(), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [SmithyHTTPAuth.BearerTokenAuthScheme()], + DefaultCodeCatalystAuthSchemeResolver(), + try AWSSDKIdentity.DefaultBearerTokenIdentityResolverChain(), + [], + [] + ) } public var partitionID: String? { return "\(CodeCatalystClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSCodeCommit/Sources/AWSCodeCommit/CodeCommitClient.swift b/Sources/Services/AWSCodeCommit/Sources/AWSCodeCommit/CodeCommitClient.swift index 2ce55ce83af..f1407e85bfa 100644 --- a/Sources/Services/AWSCodeCommit/Sources/AWSCodeCommit/CodeCommitClient.swift +++ b/Sources/Services/AWSCodeCommit/Sources/AWSCodeCommit/CodeCommitClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class CodeCommitClient: ClientRuntime.Client { public static let clientName = "CodeCommitClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: CodeCommitClient.CodeCommitClientConfiguration let serviceName = "CodeCommit" @@ -87,52 +87,54 @@ public class CodeCommitClient: ClientRuntime.Client { } extension CodeCommitClient { + public class CodeCommitClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension CodeCommitClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: CodeCommitClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCodeCommitAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCodeCommitAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCodeCommitAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCodeCommitAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultCodeCommitAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultCodeCommitAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(CodeCommitClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSCodeConnections/Sources/AWSCodeConnections/CodeConnectionsClient.swift b/Sources/Services/AWSCodeConnections/Sources/AWSCodeConnections/CodeConnectionsClient.swift index 7ac6afff996..d6000ec65a2 100644 --- a/Sources/Services/AWSCodeConnections/Sources/AWSCodeConnections/CodeConnectionsClient.swift +++ b/Sources/Services/AWSCodeConnections/Sources/AWSCodeConnections/CodeConnectionsClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class CodeConnectionsClient: ClientRuntime.Client { public static let clientName = "CodeConnectionsClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: CodeConnectionsClient.CodeConnectionsClientConfiguration let serviceName = "CodeConnections" @@ -85,52 +85,54 @@ public class CodeConnectionsClient: ClientRuntime.Client { } extension CodeConnectionsClient { + public class CodeConnectionsClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension CodeConnectionsClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: CodeConnectionsClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCodeConnectionsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCodeConnectionsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCodeConnectionsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCodeConnectionsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultCodeConnectionsAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultCodeConnectionsAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(CodeConnectionsClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSCodeDeploy/Sources/AWSCodeDeploy/CodeDeployClient.swift b/Sources/Services/AWSCodeDeploy/Sources/AWSCodeDeploy/CodeDeployClient.swift index 4391947db72..37df458e2b8 100644 --- a/Sources/Services/AWSCodeDeploy/Sources/AWSCodeDeploy/CodeDeployClient.swift +++ b/Sources/Services/AWSCodeDeploy/Sources/AWSCodeDeploy/CodeDeployClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class CodeDeployClient: ClientRuntime.Client { public static let clientName = "CodeDeployClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: CodeDeployClient.CodeDeployClientConfiguration let serviceName = "CodeDeploy" @@ -85,52 +85,54 @@ public class CodeDeployClient: ClientRuntime.Client { } extension CodeDeployClient { + public class CodeDeployClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension CodeDeployClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: CodeDeployClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCodeDeployAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCodeDeployAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCodeDeployAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCodeDeployAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultCodeDeployAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultCodeDeployAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(CodeDeployClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSCodeGuruProfiler/Sources/AWSCodeGuruProfiler/CodeGuruProfilerClient.swift b/Sources/Services/AWSCodeGuruProfiler/Sources/AWSCodeGuruProfiler/CodeGuruProfilerClient.swift index 957c1d8dac5..a734542a2b5 100644 --- a/Sources/Services/AWSCodeGuruProfiler/Sources/AWSCodeGuruProfiler/CodeGuruProfilerClient.swift +++ b/Sources/Services/AWSCodeGuruProfiler/Sources/AWSCodeGuruProfiler/CodeGuruProfilerClient.swift @@ -68,7 +68,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class CodeGuruProfilerClient: ClientRuntime.Client { public static let clientName = "CodeGuruProfilerClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: CodeGuruProfilerClient.CodeGuruProfilerClientConfiguration let serviceName = "CodeGuruProfiler" @@ -90,52 +90,54 @@ public class CodeGuruProfilerClient: ClientRuntime.Client { } extension CodeGuruProfilerClient { + public class CodeGuruProfilerClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -160,25 +162,158 @@ extension CodeGuruProfilerClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: CodeGuruProfilerClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCodeGuruProfilerAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCodeGuruProfilerAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCodeGuruProfilerAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCodeGuruProfilerAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultCodeGuruProfilerAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultCodeGuruProfilerAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(CodeGuruProfilerClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSCodeGuruReviewer/Sources/AWSCodeGuruReviewer/CodeGuruReviewerClient.swift b/Sources/Services/AWSCodeGuruReviewer/Sources/AWSCodeGuruReviewer/CodeGuruReviewerClient.swift index 68640a98d0e..dc912f49166 100644 --- a/Sources/Services/AWSCodeGuruReviewer/Sources/AWSCodeGuruReviewer/CodeGuruReviewerClient.swift +++ b/Sources/Services/AWSCodeGuruReviewer/Sources/AWSCodeGuruReviewer/CodeGuruReviewerClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class CodeGuruReviewerClient: ClientRuntime.Client { public static let clientName = "CodeGuruReviewerClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: CodeGuruReviewerClient.CodeGuruReviewerClientConfiguration let serviceName = "CodeGuru Reviewer" @@ -86,52 +86,54 @@ public class CodeGuruReviewerClient: ClientRuntime.Client { } extension CodeGuruReviewerClient { + public class CodeGuruReviewerClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension CodeGuruReviewerClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: CodeGuruReviewerClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCodeGuruReviewerAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCodeGuruReviewerAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCodeGuruReviewerAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCodeGuruReviewerAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultCodeGuruReviewerAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultCodeGuruReviewerAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(CodeGuruReviewerClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSCodeGuruSecurity/Sources/AWSCodeGuruSecurity/CodeGuruSecurityClient.swift b/Sources/Services/AWSCodeGuruSecurity/Sources/AWSCodeGuruSecurity/CodeGuruSecurityClient.swift index 8b53873963a..8efbca6e456 100644 --- a/Sources/Services/AWSCodeGuruSecurity/Sources/AWSCodeGuruSecurity/CodeGuruSecurityClient.swift +++ b/Sources/Services/AWSCodeGuruSecurity/Sources/AWSCodeGuruSecurity/CodeGuruSecurityClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class CodeGuruSecurityClient: ClientRuntime.Client { public static let clientName = "CodeGuruSecurityClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: CodeGuruSecurityClient.CodeGuruSecurityClientConfiguration let serviceName = "CodeGuru Security" @@ -87,52 +87,54 @@ public class CodeGuruSecurityClient: ClientRuntime.Client { } extension CodeGuruSecurityClient { + public class CodeGuruSecurityClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension CodeGuruSecurityClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: CodeGuruSecurityClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCodeGuruSecurityAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCodeGuruSecurityAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCodeGuruSecurityAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCodeGuruSecurityAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultCodeGuruSecurityAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultCodeGuruSecurityAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(CodeGuruSecurityClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSCodePipeline/Sources/AWSCodePipeline/CodePipelineClient.swift b/Sources/Services/AWSCodePipeline/Sources/AWSCodePipeline/CodePipelineClient.swift index c1222ff572f..3bbdbe9e3f7 100644 --- a/Sources/Services/AWSCodePipeline/Sources/AWSCodePipeline/CodePipelineClient.swift +++ b/Sources/Services/AWSCodePipeline/Sources/AWSCodePipeline/CodePipelineClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class CodePipelineClient: ClientRuntime.Client { public static let clientName = "CodePipelineClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: CodePipelineClient.CodePipelineClientConfiguration let serviceName = "CodePipeline" @@ -87,52 +87,54 @@ public class CodePipelineClient: ClientRuntime.Client { } extension CodePipelineClient { + public class CodePipelineClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension CodePipelineClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: CodePipelineClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCodePipelineAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCodePipelineAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCodePipelineAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCodePipelineAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultCodePipelineAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultCodePipelineAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(CodePipelineClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSCodeStarconnections/Sources/AWSCodeStarconnections/CodeStarconnectionsClient.swift b/Sources/Services/AWSCodeStarconnections/Sources/AWSCodeStarconnections/CodeStarconnectionsClient.swift index 1d394609ba3..31448ff02e9 100644 --- a/Sources/Services/AWSCodeStarconnections/Sources/AWSCodeStarconnections/CodeStarconnectionsClient.swift +++ b/Sources/Services/AWSCodeStarconnections/Sources/AWSCodeStarconnections/CodeStarconnectionsClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class CodeStarconnectionsClient: ClientRuntime.Client { public static let clientName = "CodeStarconnectionsClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: CodeStarconnectionsClient.CodeStarconnectionsClientConfiguration let serviceName = "CodeStar connections" @@ -85,52 +85,54 @@ public class CodeStarconnectionsClient: ClientRuntime.Client { } extension CodeStarconnectionsClient { + public class CodeStarconnectionsClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension CodeStarconnectionsClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: CodeStarconnectionsClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCodeStarconnectionsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCodeStarconnectionsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCodeStarconnectionsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCodeStarconnectionsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultCodeStarconnectionsAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultCodeStarconnectionsAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(CodeStarconnectionsClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSCodeartifact/Sources/AWSCodeartifact/CodeartifactClient.swift b/Sources/Services/AWSCodeartifact/Sources/AWSCodeartifact/CodeartifactClient.swift index 912fadd3412..be92853cdd1 100644 --- a/Sources/Services/AWSCodeartifact/Sources/AWSCodeartifact/CodeartifactClient.swift +++ b/Sources/Services/AWSCodeartifact/Sources/AWSCodeartifact/CodeartifactClient.swift @@ -68,7 +68,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class CodeartifactClient: ClientRuntime.Client { public static let clientName = "CodeartifactClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: CodeartifactClient.CodeartifactClientConfiguration let serviceName = "codeartifact" @@ -90,52 +90,54 @@ public class CodeartifactClient: ClientRuntime.Client { } extension CodeartifactClient { + public class CodeartifactClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -160,25 +162,158 @@ extension CodeartifactClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: CodeartifactClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCodeartifactAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCodeartifactAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCodeartifactAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCodeartifactAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultCodeartifactAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultCodeartifactAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(CodeartifactClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSCodestarnotifications/Sources/AWSCodestarnotifications/CodestarnotificationsClient.swift b/Sources/Services/AWSCodestarnotifications/Sources/AWSCodestarnotifications/CodestarnotificationsClient.swift index 3ca83a56cfb..d66543be157 100644 --- a/Sources/Services/AWSCodestarnotifications/Sources/AWSCodestarnotifications/CodestarnotificationsClient.swift +++ b/Sources/Services/AWSCodestarnotifications/Sources/AWSCodestarnotifications/CodestarnotificationsClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class CodestarnotificationsClient: ClientRuntime.Client { public static let clientName = "CodestarnotificationsClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: CodestarnotificationsClient.CodestarnotificationsClientConfiguration let serviceName = "codestar notifications" @@ -87,52 +87,54 @@ public class CodestarnotificationsClient: ClientRuntime.Client { } extension CodestarnotificationsClient { + public class CodestarnotificationsClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension CodestarnotificationsClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: CodestarnotificationsClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCodestarnotificationsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCodestarnotificationsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCodestarnotificationsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCodestarnotificationsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultCodestarnotificationsAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultCodestarnotificationsAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(CodestarnotificationsClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSCognitoIdentity/Sources/AWSCognitoIdentity/CognitoIdentityClient.swift b/Sources/Services/AWSCognitoIdentity/Sources/AWSCognitoIdentity/CognitoIdentityClient.swift index 45078b86780..fc65d073d1d 100644 --- a/Sources/Services/AWSCognitoIdentity/Sources/AWSCognitoIdentity/CognitoIdentityClient.swift +++ b/Sources/Services/AWSCognitoIdentity/Sources/AWSCognitoIdentity/CognitoIdentityClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class CognitoIdentityClient: ClientRuntime.Client { public static let clientName = "CognitoIdentityClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: CognitoIdentityClient.CognitoIdentityClientConfiguration let serviceName = "Cognito Identity" @@ -86,52 +86,54 @@ public class CognitoIdentityClient: ClientRuntime.Client { } extension CognitoIdentityClient { + public class CognitoIdentityClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension CognitoIdentityClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: CognitoIdentityClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCognitoIdentityAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCognitoIdentityAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCognitoIdentityAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCognitoIdentityAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultCognitoIdentityAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultCognitoIdentityAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(CognitoIdentityClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSCognitoIdentityProvider/Sources/AWSCognitoIdentityProvider/CognitoIdentityProviderClient.swift b/Sources/Services/AWSCognitoIdentityProvider/Sources/AWSCognitoIdentityProvider/CognitoIdentityProviderClient.swift index b42e310c5c6..9db4873158d 100644 --- a/Sources/Services/AWSCognitoIdentityProvider/Sources/AWSCognitoIdentityProvider/CognitoIdentityProviderClient.swift +++ b/Sources/Services/AWSCognitoIdentityProvider/Sources/AWSCognitoIdentityProvider/CognitoIdentityProviderClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class CognitoIdentityProviderClient: ClientRuntime.Client { public static let clientName = "CognitoIdentityProviderClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: CognitoIdentityProviderClient.CognitoIdentityProviderClientConfiguration let serviceName = "Cognito Identity Provider" @@ -87,52 +87,54 @@ public class CognitoIdentityProviderClient: ClientRuntime.Client { } extension CognitoIdentityProviderClient { + public class CognitoIdentityProviderClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension CognitoIdentityProviderClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: CognitoIdentityProviderClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCognitoIdentityProviderAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCognitoIdentityProviderAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCognitoIdentityProviderAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCognitoIdentityProviderAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultCognitoIdentityProviderAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultCognitoIdentityProviderAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(CognitoIdentityProviderClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSCognitoSync/Sources/AWSCognitoSync/CognitoSyncClient.swift b/Sources/Services/AWSCognitoSync/Sources/AWSCognitoSync/CognitoSyncClient.swift index 98a0b301da3..02ef6f9d29a 100644 --- a/Sources/Services/AWSCognitoSync/Sources/AWSCognitoSync/CognitoSyncClient.swift +++ b/Sources/Services/AWSCognitoSync/Sources/AWSCognitoSync/CognitoSyncClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class CognitoSyncClient: ClientRuntime.Client { public static let clientName = "CognitoSyncClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: CognitoSyncClient.CognitoSyncClientConfiguration let serviceName = "Cognito Sync" @@ -87,52 +87,54 @@ public class CognitoSyncClient: ClientRuntime.Client { } extension CognitoSyncClient { + public class CognitoSyncClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension CognitoSyncClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: CognitoSyncClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCognitoSyncAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCognitoSyncAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCognitoSyncAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCognitoSyncAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultCognitoSyncAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultCognitoSyncAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(CognitoSyncClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSComprehend/Sources/AWSComprehend/ComprehendClient.swift b/Sources/Services/AWSComprehend/Sources/AWSComprehend/ComprehendClient.swift index 29d9ba91a97..aa54f8c2b69 100644 --- a/Sources/Services/AWSComprehend/Sources/AWSComprehend/ComprehendClient.swift +++ b/Sources/Services/AWSComprehend/Sources/AWSComprehend/ComprehendClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ComprehendClient: ClientRuntime.Client { public static let clientName = "ComprehendClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ComprehendClient.ComprehendClientConfiguration let serviceName = "Comprehend" @@ -87,52 +87,54 @@ public class ComprehendClient: ClientRuntime.Client { } extension ComprehendClient { + public class ComprehendClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension ComprehendClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: ComprehendClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultComprehendAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultComprehendAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultComprehendAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultComprehendAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultComprehendAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultComprehendAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ComprehendClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSComprehendMedical/Sources/AWSComprehendMedical/ComprehendMedicalClient.swift b/Sources/Services/AWSComprehendMedical/Sources/AWSComprehendMedical/ComprehendMedicalClient.swift index 1b968014530..125e7ef95ce 100644 --- a/Sources/Services/AWSComprehendMedical/Sources/AWSComprehendMedical/ComprehendMedicalClient.swift +++ b/Sources/Services/AWSComprehendMedical/Sources/AWSComprehendMedical/ComprehendMedicalClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ComprehendMedicalClient: ClientRuntime.Client { public static let clientName = "ComprehendMedicalClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ComprehendMedicalClient.ComprehendMedicalClientConfiguration let serviceName = "ComprehendMedical" @@ -86,52 +86,54 @@ public class ComprehendMedicalClient: ClientRuntime.Client { } extension ComprehendMedicalClient { + public class ComprehendMedicalClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension ComprehendMedicalClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: ComprehendMedicalClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultComprehendMedicalAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultComprehendMedicalAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultComprehendMedicalAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultComprehendMedicalAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultComprehendMedicalAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultComprehendMedicalAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ComprehendMedicalClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSComputeOptimizer/Sources/AWSComputeOptimizer/ComputeOptimizerClient.swift b/Sources/Services/AWSComputeOptimizer/Sources/AWSComputeOptimizer/ComputeOptimizerClient.swift index c1988be4335..1f31cdee96e 100644 --- a/Sources/Services/AWSComputeOptimizer/Sources/AWSComputeOptimizer/ComputeOptimizerClient.swift +++ b/Sources/Services/AWSComputeOptimizer/Sources/AWSComputeOptimizer/ComputeOptimizerClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ComputeOptimizerClient: ClientRuntime.Client { public static let clientName = "ComputeOptimizerClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ComputeOptimizerClient.ComputeOptimizerClientConfiguration let serviceName = "Compute Optimizer" @@ -86,52 +86,54 @@ public class ComputeOptimizerClient: ClientRuntime.Client { } extension ComputeOptimizerClient { + public class ComputeOptimizerClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension ComputeOptimizerClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: ComputeOptimizerClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultComputeOptimizerAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultComputeOptimizerAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultComputeOptimizerAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultComputeOptimizerAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultComputeOptimizerAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultComputeOptimizerAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ComputeOptimizerClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSConfigService/Sources/AWSConfigService/ConfigClient.swift b/Sources/Services/AWSConfigService/Sources/AWSConfigService/ConfigClient.swift index 35d42b8a91a..1a3d501a7bf 100644 --- a/Sources/Services/AWSConfigService/Sources/AWSConfigService/ConfigClient.swift +++ b/Sources/Services/AWSConfigService/Sources/AWSConfigService/ConfigClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ConfigClient: ClientRuntime.Client { public static let clientName = "ConfigClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ConfigClient.ConfigClientConfiguration let serviceName = "Config" @@ -86,52 +86,54 @@ public class ConfigClient: ClientRuntime.Client { } extension ConfigClient { + public class ConfigClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension ConfigClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: ConfigClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultConfigServiceAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultConfigServiceAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultConfigServiceAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultConfigServiceAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultConfigServiceAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultConfigServiceAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ConfigClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSConnect/Sources/AWSConnect/ConnectClient.swift b/Sources/Services/AWSConnect/Sources/AWSConnect/ConnectClient.swift index 851dcbca35f..38ac8261d3c 100644 --- a/Sources/Services/AWSConnect/Sources/AWSConnect/ConnectClient.swift +++ b/Sources/Services/AWSConnect/Sources/AWSConnect/ConnectClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ConnectClient: ClientRuntime.Client { public static let clientName = "ConnectClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ConnectClient.ConnectClientConfiguration let serviceName = "Connect" @@ -87,52 +87,54 @@ public class ConnectClient: ClientRuntime.Client { } extension ConnectClient { + public class ConnectClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension ConnectClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: ConnectClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultConnectAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultConnectAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultConnectAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultConnectAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultConnectAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultConnectAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ConnectClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSConnectCampaigns/Sources/AWSConnectCampaigns/ConnectCampaignsClient.swift b/Sources/Services/AWSConnectCampaigns/Sources/AWSConnectCampaigns/ConnectCampaignsClient.swift index 1d26feb4cdc..09b6c6ddfc3 100644 --- a/Sources/Services/AWSConnectCampaigns/Sources/AWSConnectCampaigns/ConnectCampaignsClient.swift +++ b/Sources/Services/AWSConnectCampaigns/Sources/AWSConnectCampaigns/ConnectCampaignsClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ConnectCampaignsClient: ClientRuntime.Client { public static let clientName = "ConnectCampaignsClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ConnectCampaignsClient.ConnectCampaignsClientConfiguration let serviceName = "ConnectCampaigns" @@ -85,52 +85,54 @@ public class ConnectCampaignsClient: ClientRuntime.Client { } extension ConnectCampaignsClient { + public class ConnectCampaignsClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension ConnectCampaignsClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: ConnectCampaignsClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultConnectCampaignsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultConnectCampaignsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultConnectCampaignsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultConnectCampaignsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultConnectCampaignsAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultConnectCampaignsAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ConnectCampaignsClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSConnectCampaignsV2/Sources/AWSConnectCampaignsV2/ConnectCampaignsV2Client.swift b/Sources/Services/AWSConnectCampaignsV2/Sources/AWSConnectCampaignsV2/ConnectCampaignsV2Client.swift index b020a67e18d..917866edddc 100644 --- a/Sources/Services/AWSConnectCampaignsV2/Sources/AWSConnectCampaignsV2/ConnectCampaignsV2Client.swift +++ b/Sources/Services/AWSConnectCampaignsV2/Sources/AWSConnectCampaignsV2/ConnectCampaignsV2Client.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ConnectCampaignsV2Client: ClientRuntime.Client { public static let clientName = "ConnectCampaignsV2Client" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ConnectCampaignsV2Client.ConnectCampaignsV2ClientConfiguration let serviceName = "ConnectCampaignsV2" @@ -85,52 +85,54 @@ public class ConnectCampaignsV2Client: ClientRuntime.Client { } extension ConnectCampaignsV2Client { + public class ConnectCampaignsV2ClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension ConnectCampaignsV2Client { self.logger = telemetryProvider.loggerProvider.getLogger(name: ConnectCampaignsV2Client.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultConnectCampaignsV2AuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultConnectCampaignsV2AuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultConnectCampaignsV2AuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultConnectCampaignsV2AuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultConnectCampaignsV2AuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultConnectCampaignsV2AuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ConnectCampaignsV2Client.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSConnectCases/Sources/AWSConnectCases/ConnectCasesClient.swift b/Sources/Services/AWSConnectCases/Sources/AWSConnectCases/ConnectCasesClient.swift index db72121019f..b6f3b8cd38e 100644 --- a/Sources/Services/AWSConnectCases/Sources/AWSConnectCases/ConnectCasesClient.swift +++ b/Sources/Services/AWSConnectCases/Sources/AWSConnectCases/ConnectCasesClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ConnectCasesClient: ClientRuntime.Client { public static let clientName = "ConnectCasesClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ConnectCasesClient.ConnectCasesClientConfiguration let serviceName = "ConnectCases" @@ -87,52 +87,54 @@ public class ConnectCasesClient: ClientRuntime.Client { } extension ConnectCasesClient { + public class ConnectCasesClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension ConnectCasesClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: ConnectCasesClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultConnectCasesAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultConnectCasesAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultConnectCasesAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultConnectCasesAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultConnectCasesAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultConnectCasesAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ConnectCasesClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSConnectContactLens/Sources/AWSConnectContactLens/ConnectContactLensClient.swift b/Sources/Services/AWSConnectContactLens/Sources/AWSConnectContactLens/ConnectContactLensClient.swift index a854673e5b3..532e3d58d1e 100644 --- a/Sources/Services/AWSConnectContactLens/Sources/AWSConnectContactLens/ConnectContactLensClient.swift +++ b/Sources/Services/AWSConnectContactLens/Sources/AWSConnectContactLens/ConnectContactLensClient.swift @@ -62,7 +62,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ConnectContactLensClient: ClientRuntime.Client { public static let clientName = "ConnectContactLensClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ConnectContactLensClient.ConnectContactLensClientConfiguration let serviceName = "Connect Contact Lens" @@ -84,52 +84,54 @@ public class ConnectContactLensClient: ClientRuntime.Client { } extension ConnectContactLensClient { + public class ConnectContactLensClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -154,25 +156,158 @@ extension ConnectContactLensClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: ConnectContactLensClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultConnectContactLensAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultConnectContactLensAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultConnectContactLensAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultConnectContactLensAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultConnectContactLensAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultConnectContactLensAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ConnectContactLensClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSConnectParticipant/Sources/AWSConnectParticipant/ConnectParticipantClient.swift b/Sources/Services/AWSConnectParticipant/Sources/AWSConnectParticipant/ConnectParticipantClient.swift index 333d6e44ac4..d7732fad1c8 100644 --- a/Sources/Services/AWSConnectParticipant/Sources/AWSConnectParticipant/ConnectParticipantClient.swift +++ b/Sources/Services/AWSConnectParticipant/Sources/AWSConnectParticipant/ConnectParticipantClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ConnectParticipantClient: ClientRuntime.Client { public static let clientName = "ConnectParticipantClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ConnectParticipantClient.ConnectParticipantClientConfiguration let serviceName = "ConnectParticipant" @@ -86,52 +86,54 @@ public class ConnectParticipantClient: ClientRuntime.Client { } extension ConnectParticipantClient { + public class ConnectParticipantClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension ConnectParticipantClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: ConnectParticipantClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultConnectParticipantAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultConnectParticipantAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultConnectParticipantAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultConnectParticipantAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultConnectParticipantAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultConnectParticipantAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ConnectParticipantClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSControlCatalog/Sources/AWSControlCatalog/ControlCatalogClient.swift b/Sources/Services/AWSControlCatalog/Sources/AWSControlCatalog/ControlCatalogClient.swift index 7c0bf3c2b12..b7708834dc4 100644 --- a/Sources/Services/AWSControlCatalog/Sources/AWSControlCatalog/ControlCatalogClient.swift +++ b/Sources/Services/AWSControlCatalog/Sources/AWSControlCatalog/ControlCatalogClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ControlCatalogClient: ClientRuntime.Client { public static let clientName = "ControlCatalogClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ControlCatalogClient.ControlCatalogClientConfiguration let serviceName = "ControlCatalog" @@ -85,52 +85,54 @@ public class ControlCatalogClient: ClientRuntime.Client { } extension ControlCatalogClient { + public class ControlCatalogClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension ControlCatalogClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: ControlCatalogClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultControlCatalogAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultControlCatalogAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultControlCatalogAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultControlCatalogAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultControlCatalogAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultControlCatalogAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ControlCatalogClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSControlTower/Sources/AWSControlTower/ControlTowerClient.swift b/Sources/Services/AWSControlTower/Sources/AWSControlTower/ControlTowerClient.swift index b600b2201ac..4886608637b 100644 --- a/Sources/Services/AWSControlTower/Sources/AWSControlTower/ControlTowerClient.swift +++ b/Sources/Services/AWSControlTower/Sources/AWSControlTower/ControlTowerClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ControlTowerClient: ClientRuntime.Client { public static let clientName = "ControlTowerClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ControlTowerClient.ControlTowerClientConfiguration let serviceName = "ControlTower" @@ -86,52 +86,54 @@ public class ControlTowerClient: ClientRuntime.Client { } extension ControlTowerClient { + public class ControlTowerClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension ControlTowerClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: ControlTowerClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultControlTowerAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultControlTowerAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultControlTowerAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultControlTowerAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultControlTowerAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultControlTowerAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ControlTowerClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSCostExplorer/Sources/AWSCostExplorer/CostExplorerClient.swift b/Sources/Services/AWSCostExplorer/Sources/AWSCostExplorer/CostExplorerClient.swift index 3d1479b23b4..704cd9b856d 100644 --- a/Sources/Services/AWSCostExplorer/Sources/AWSCostExplorer/CostExplorerClient.swift +++ b/Sources/Services/AWSCostExplorer/Sources/AWSCostExplorer/CostExplorerClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class CostExplorerClient: ClientRuntime.Client { public static let clientName = "CostExplorerClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: CostExplorerClient.CostExplorerClientConfiguration let serviceName = "Cost Explorer" @@ -85,52 +85,54 @@ public class CostExplorerClient: ClientRuntime.Client { } extension CostExplorerClient { + public class CostExplorerClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension CostExplorerClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: CostExplorerClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCostExplorerAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCostExplorerAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCostExplorerAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCostExplorerAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultCostExplorerAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultCostExplorerAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(CostExplorerClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSCostOptimizationHub/Sources/AWSCostOptimizationHub/CostOptimizationHubClient.swift b/Sources/Services/AWSCostOptimizationHub/Sources/AWSCostOptimizationHub/CostOptimizationHubClient.swift index 2a702e8ea18..a9b51933279 100644 --- a/Sources/Services/AWSCostOptimizationHub/Sources/AWSCostOptimizationHub/CostOptimizationHubClient.swift +++ b/Sources/Services/AWSCostOptimizationHub/Sources/AWSCostOptimizationHub/CostOptimizationHubClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class CostOptimizationHubClient: ClientRuntime.Client { public static let clientName = "CostOptimizationHubClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: CostOptimizationHubClient.CostOptimizationHubClientConfiguration let serviceName = "Cost Optimization Hub" @@ -86,52 +86,54 @@ public class CostOptimizationHubClient: ClientRuntime.Client { } extension CostOptimizationHubClient { + public class CostOptimizationHubClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension CostOptimizationHubClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: CostOptimizationHubClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCostOptimizationHubAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCostOptimizationHubAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCostOptimizationHubAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCostOptimizationHubAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultCostOptimizationHubAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultCostOptimizationHubAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(CostOptimizationHubClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSCostandUsageReportService/Sources/AWSCostandUsageReportService/CostandUsageReportClient.swift b/Sources/Services/AWSCostandUsageReportService/Sources/AWSCostandUsageReportService/CostandUsageReportClient.swift index 38572123198..7d82a283e62 100644 --- a/Sources/Services/AWSCostandUsageReportService/Sources/AWSCostandUsageReportService/CostandUsageReportClient.swift +++ b/Sources/Services/AWSCostandUsageReportService/Sources/AWSCostandUsageReportService/CostandUsageReportClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class CostandUsageReportClient: ClientRuntime.Client { public static let clientName = "CostandUsageReportClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: CostandUsageReportClient.CostandUsageReportClientConfiguration let serviceName = "Cost and Usage Report" @@ -85,52 +85,54 @@ public class CostandUsageReportClient: ClientRuntime.Client { } extension CostandUsageReportClient { + public class CostandUsageReportClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension CostandUsageReportClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: CostandUsageReportClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCostandUsageReportServiceAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCostandUsageReportServiceAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCostandUsageReportServiceAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCostandUsageReportServiceAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultCostandUsageReportServiceAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultCostandUsageReportServiceAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(CostandUsageReportClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSCustomerProfiles/Sources/AWSCustomerProfiles/CustomerProfilesClient.swift b/Sources/Services/AWSCustomerProfiles/Sources/AWSCustomerProfiles/CustomerProfilesClient.swift index f7aaf613214..2f292bccb8b 100644 --- a/Sources/Services/AWSCustomerProfiles/Sources/AWSCustomerProfiles/CustomerProfilesClient.swift +++ b/Sources/Services/AWSCustomerProfiles/Sources/AWSCustomerProfiles/CustomerProfilesClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class CustomerProfilesClient: ClientRuntime.Client { public static let clientName = "CustomerProfilesClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: CustomerProfilesClient.CustomerProfilesClientConfiguration let serviceName = "Customer Profiles" @@ -86,52 +86,54 @@ public class CustomerProfilesClient: ClientRuntime.Client { } extension CustomerProfilesClient { + public class CustomerProfilesClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension CustomerProfilesClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: CustomerProfilesClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCustomerProfilesAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCustomerProfilesAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultCustomerProfilesAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultCustomerProfilesAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultCustomerProfilesAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultCustomerProfilesAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(CustomerProfilesClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSDAX/Sources/AWSDAX/DAXClient.swift b/Sources/Services/AWSDAX/Sources/AWSDAX/DAXClient.swift index 98cdab43854..bb291753513 100644 --- a/Sources/Services/AWSDAX/Sources/AWSDAX/DAXClient.swift +++ b/Sources/Services/AWSDAX/Sources/AWSDAX/DAXClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class DAXClient: ClientRuntime.Client { public static let clientName = "DAXClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: DAXClient.DAXClientConfiguration let serviceName = "DAX" @@ -86,52 +86,54 @@ public class DAXClient: ClientRuntime.Client { } extension DAXClient { + public class DAXClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension DAXClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: DAXClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultDAXAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultDAXAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultDAXAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultDAXAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultDAXAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultDAXAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(DAXClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSDLM/Sources/AWSDLM/DLMClient.swift b/Sources/Services/AWSDLM/Sources/AWSDLM/DLMClient.swift index 9756a6dec16..da6409863a6 100644 --- a/Sources/Services/AWSDLM/Sources/AWSDLM/DLMClient.swift +++ b/Sources/Services/AWSDLM/Sources/AWSDLM/DLMClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class DLMClient: ClientRuntime.Client { public static let clientName = "DLMClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: DLMClient.DLMClientConfiguration let serviceName = "DLM" @@ -85,52 +85,54 @@ public class DLMClient: ClientRuntime.Client { } extension DLMClient { + public class DLMClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension DLMClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: DLMClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultDLMAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultDLMAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultDLMAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultDLMAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultDLMAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultDLMAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(DLMClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSDSQL/Sources/AWSDSQL/DSQLClient.swift b/Sources/Services/AWSDSQL/Sources/AWSDSQL/DSQLClient.swift index b2bc3931a89..a215149255b 100644 --- a/Sources/Services/AWSDSQL/Sources/AWSDSQL/DSQLClient.swift +++ b/Sources/Services/AWSDSQL/Sources/AWSDSQL/DSQLClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class DSQLClient: ClientRuntime.Client { public static let clientName = "DSQLClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: DSQLClient.DSQLClientConfiguration let serviceName = "DSQL" @@ -87,52 +87,54 @@ public class DSQLClient: ClientRuntime.Client { } extension DSQLClient { + public class DSQLClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension DSQLClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: DSQLClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultDSQLAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultDSQLAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultDSQLAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultDSQLAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultDSQLAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultDSQLAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(DSQLClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSDataBrew/Sources/AWSDataBrew/DataBrewClient.swift b/Sources/Services/AWSDataBrew/Sources/AWSDataBrew/DataBrewClient.swift index 3c14bbf73f2..879d9ab5ca0 100644 --- a/Sources/Services/AWSDataBrew/Sources/AWSDataBrew/DataBrewClient.swift +++ b/Sources/Services/AWSDataBrew/Sources/AWSDataBrew/DataBrewClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class DataBrewClient: ClientRuntime.Client { public static let clientName = "DataBrewClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: DataBrewClient.DataBrewClientConfiguration let serviceName = "DataBrew" @@ -86,52 +86,54 @@ public class DataBrewClient: ClientRuntime.Client { } extension DataBrewClient { + public class DataBrewClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension DataBrewClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: DataBrewClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultDataBrewAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultDataBrewAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultDataBrewAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultDataBrewAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultDataBrewAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultDataBrewAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(DataBrewClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSDataExchange/Sources/AWSDataExchange/DataExchangeClient.swift b/Sources/Services/AWSDataExchange/Sources/AWSDataExchange/DataExchangeClient.swift index da3a1d583a8..65841bd5840 100644 --- a/Sources/Services/AWSDataExchange/Sources/AWSDataExchange/DataExchangeClient.swift +++ b/Sources/Services/AWSDataExchange/Sources/AWSDataExchange/DataExchangeClient.swift @@ -68,7 +68,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class DataExchangeClient: ClientRuntime.Client { public static let clientName = "DataExchangeClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: DataExchangeClient.DataExchangeClientConfiguration let serviceName = "DataExchange" @@ -90,52 +90,54 @@ public class DataExchangeClient: ClientRuntime.Client { } extension DataExchangeClient { + public class DataExchangeClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -160,25 +162,158 @@ extension DataExchangeClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: DataExchangeClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultDataExchangeAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultDataExchangeAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultDataExchangeAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultDataExchangeAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultDataExchangeAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultDataExchangeAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(DataExchangeClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSDataPipeline/Sources/AWSDataPipeline/DataPipelineClient.swift b/Sources/Services/AWSDataPipeline/Sources/AWSDataPipeline/DataPipelineClient.swift index 2aff745a138..7a3cae8efbd 100644 --- a/Sources/Services/AWSDataPipeline/Sources/AWSDataPipeline/DataPipelineClient.swift +++ b/Sources/Services/AWSDataPipeline/Sources/AWSDataPipeline/DataPipelineClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class DataPipelineClient: ClientRuntime.Client { public static let clientName = "DataPipelineClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: DataPipelineClient.DataPipelineClientConfiguration let serviceName = "Data Pipeline" @@ -86,52 +86,54 @@ public class DataPipelineClient: ClientRuntime.Client { } extension DataPipelineClient { + public class DataPipelineClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension DataPipelineClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: DataPipelineClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultDataPipelineAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultDataPipelineAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultDataPipelineAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultDataPipelineAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultDataPipelineAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultDataPipelineAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(DataPipelineClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSDataSync/Sources/AWSDataSync/DataSyncClient.swift b/Sources/Services/AWSDataSync/Sources/AWSDataSync/DataSyncClient.swift index 03240917aee..8f8087c3c4e 100644 --- a/Sources/Services/AWSDataSync/Sources/AWSDataSync/DataSyncClient.swift +++ b/Sources/Services/AWSDataSync/Sources/AWSDataSync/DataSyncClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class DataSyncClient: ClientRuntime.Client { public static let clientName = "DataSyncClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: DataSyncClient.DataSyncClientConfiguration let serviceName = "DataSync" @@ -87,52 +87,54 @@ public class DataSyncClient: ClientRuntime.Client { } extension DataSyncClient { + public class DataSyncClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension DataSyncClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: DataSyncClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultDataSyncAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultDataSyncAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultDataSyncAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultDataSyncAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultDataSyncAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultDataSyncAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(DataSyncClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSDataZone/Sources/AWSDataZone/DataZoneClient.swift b/Sources/Services/AWSDataZone/Sources/AWSDataZone/DataZoneClient.swift index eb2125ce5ef..9a5bfb46781 100644 --- a/Sources/Services/AWSDataZone/Sources/AWSDataZone/DataZoneClient.swift +++ b/Sources/Services/AWSDataZone/Sources/AWSDataZone/DataZoneClient.swift @@ -68,7 +68,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class DataZoneClient: ClientRuntime.Client { public static let clientName = "DataZoneClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: DataZoneClient.DataZoneClientConfiguration let serviceName = "DataZone" @@ -90,52 +90,54 @@ public class DataZoneClient: ClientRuntime.Client { } extension DataZoneClient { + public class DataZoneClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -160,25 +162,158 @@ extension DataZoneClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: DataZoneClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultDataZoneAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultDataZoneAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultDataZoneAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultDataZoneAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultDataZoneAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultDataZoneAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(DataZoneClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSDatabaseMigrationService/Sources/AWSDatabaseMigrationService/DatabaseMigrationClient.swift b/Sources/Services/AWSDatabaseMigrationService/Sources/AWSDatabaseMigrationService/DatabaseMigrationClient.swift index c30f0a41d69..38982732b18 100644 --- a/Sources/Services/AWSDatabaseMigrationService/Sources/AWSDatabaseMigrationService/DatabaseMigrationClient.swift +++ b/Sources/Services/AWSDatabaseMigrationService/Sources/AWSDatabaseMigrationService/DatabaseMigrationClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class DatabaseMigrationClient: ClientRuntime.Client { public static let clientName = "DatabaseMigrationClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: DatabaseMigrationClient.DatabaseMigrationClientConfiguration let serviceName = "Database Migration" @@ -86,52 +86,54 @@ public class DatabaseMigrationClient: ClientRuntime.Client { } extension DatabaseMigrationClient { + public class DatabaseMigrationClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension DatabaseMigrationClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: DatabaseMigrationClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultDatabaseMigrationServiceAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultDatabaseMigrationServiceAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultDatabaseMigrationServiceAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultDatabaseMigrationServiceAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultDatabaseMigrationServiceAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultDatabaseMigrationServiceAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(DatabaseMigrationClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSDeadline/Sources/AWSDeadline/DeadlineClient.swift b/Sources/Services/AWSDeadline/Sources/AWSDeadline/DeadlineClient.swift index 9c27e08619f..fe326a09111 100644 --- a/Sources/Services/AWSDeadline/Sources/AWSDeadline/DeadlineClient.swift +++ b/Sources/Services/AWSDeadline/Sources/AWSDeadline/DeadlineClient.swift @@ -67,7 +67,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class DeadlineClient: ClientRuntime.Client { public static let clientName = "DeadlineClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: DeadlineClient.DeadlineClientConfiguration let serviceName = "deadline" @@ -89,52 +89,54 @@ public class DeadlineClient: ClientRuntime.Client { } extension DeadlineClient { + public class DeadlineClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -159,25 +161,158 @@ extension DeadlineClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: DeadlineClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultDeadlineAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultDeadlineAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultDeadlineAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultDeadlineAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultDeadlineAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultDeadlineAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(DeadlineClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSDetective/Sources/AWSDetective/DetectiveClient.swift b/Sources/Services/AWSDetective/Sources/AWSDetective/DetectiveClient.swift index 798d5ef1b0d..9e2ac33479f 100644 --- a/Sources/Services/AWSDetective/Sources/AWSDetective/DetectiveClient.swift +++ b/Sources/Services/AWSDetective/Sources/AWSDetective/DetectiveClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class DetectiveClient: ClientRuntime.Client { public static let clientName = "DetectiveClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: DetectiveClient.DetectiveClientConfiguration let serviceName = "Detective" @@ -86,52 +86,54 @@ public class DetectiveClient: ClientRuntime.Client { } extension DetectiveClient { + public class DetectiveClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension DetectiveClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: DetectiveClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultDetectiveAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultDetectiveAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultDetectiveAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultDetectiveAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultDetectiveAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultDetectiveAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(DetectiveClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSDevOpsGuru/Sources/AWSDevOpsGuru/DevOpsGuruClient.swift b/Sources/Services/AWSDevOpsGuru/Sources/AWSDevOpsGuru/DevOpsGuruClient.swift index f05781e7869..c49f4b68730 100644 --- a/Sources/Services/AWSDevOpsGuru/Sources/AWSDevOpsGuru/DevOpsGuruClient.swift +++ b/Sources/Services/AWSDevOpsGuru/Sources/AWSDevOpsGuru/DevOpsGuruClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class DevOpsGuruClient: ClientRuntime.Client { public static let clientName = "DevOpsGuruClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: DevOpsGuruClient.DevOpsGuruClientConfiguration let serviceName = "DevOps Guru" @@ -87,52 +87,54 @@ public class DevOpsGuruClient: ClientRuntime.Client { } extension DevOpsGuruClient { + public class DevOpsGuruClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension DevOpsGuruClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: DevOpsGuruClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultDevOpsGuruAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultDevOpsGuruAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultDevOpsGuruAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultDevOpsGuruAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultDevOpsGuruAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultDevOpsGuruAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(DevOpsGuruClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSDeviceFarm/Sources/AWSDeviceFarm/DeviceFarmClient.swift b/Sources/Services/AWSDeviceFarm/Sources/AWSDeviceFarm/DeviceFarmClient.swift index e28e4acbcb1..2d1728d008a 100644 --- a/Sources/Services/AWSDeviceFarm/Sources/AWSDeviceFarm/DeviceFarmClient.swift +++ b/Sources/Services/AWSDeviceFarm/Sources/AWSDeviceFarm/DeviceFarmClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class DeviceFarmClient: ClientRuntime.Client { public static let clientName = "DeviceFarmClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: DeviceFarmClient.DeviceFarmClientConfiguration let serviceName = "Device Farm" @@ -86,52 +86,54 @@ public class DeviceFarmClient: ClientRuntime.Client { } extension DeviceFarmClient { + public class DeviceFarmClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension DeviceFarmClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: DeviceFarmClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultDeviceFarmAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultDeviceFarmAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultDeviceFarmAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultDeviceFarmAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultDeviceFarmAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultDeviceFarmAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(DeviceFarmClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSDirectConnect/Sources/AWSDirectConnect/DirectConnectClient.swift b/Sources/Services/AWSDirectConnect/Sources/AWSDirectConnect/DirectConnectClient.swift index c459814349d..8a8c6d0d8ac 100644 --- a/Sources/Services/AWSDirectConnect/Sources/AWSDirectConnect/DirectConnectClient.swift +++ b/Sources/Services/AWSDirectConnect/Sources/AWSDirectConnect/DirectConnectClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class DirectConnectClient: ClientRuntime.Client { public static let clientName = "DirectConnectClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: DirectConnectClient.DirectConnectClientConfiguration let serviceName = "Direct Connect" @@ -86,52 +86,54 @@ public class DirectConnectClient: ClientRuntime.Client { } extension DirectConnectClient { + public class DirectConnectClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension DirectConnectClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: DirectConnectClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultDirectConnectAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultDirectConnectAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultDirectConnectAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultDirectConnectAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultDirectConnectAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultDirectConnectAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(DirectConnectClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSDirectoryService/Sources/AWSDirectoryService/DirectoryClient.swift b/Sources/Services/AWSDirectoryService/Sources/AWSDirectoryService/DirectoryClient.swift index d0cd02d5d7b..713336387a4 100644 --- a/Sources/Services/AWSDirectoryService/Sources/AWSDirectoryService/DirectoryClient.swift +++ b/Sources/Services/AWSDirectoryService/Sources/AWSDirectoryService/DirectoryClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class DirectoryClient: ClientRuntime.Client { public static let clientName = "DirectoryClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: DirectoryClient.DirectoryClientConfiguration let serviceName = "Directory" @@ -85,52 +85,54 @@ public class DirectoryClient: ClientRuntime.Client { } extension DirectoryClient { + public class DirectoryClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension DirectoryClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: DirectoryClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultDirectoryServiceAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultDirectoryServiceAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultDirectoryServiceAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultDirectoryServiceAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultDirectoryServiceAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultDirectoryServiceAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(DirectoryClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSDirectoryServiceData/Sources/AWSDirectoryServiceData/DirectoryServiceDataClient.swift b/Sources/Services/AWSDirectoryServiceData/Sources/AWSDirectoryServiceData/DirectoryServiceDataClient.swift index 780db4205b9..4aebeb3eea2 100644 --- a/Sources/Services/AWSDirectoryServiceData/Sources/AWSDirectoryServiceData/DirectoryServiceDataClient.swift +++ b/Sources/Services/AWSDirectoryServiceData/Sources/AWSDirectoryServiceData/DirectoryServiceDataClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class DirectoryServiceDataClient: ClientRuntime.Client { public static let clientName = "DirectoryServiceDataClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: DirectoryServiceDataClient.DirectoryServiceDataClientConfiguration let serviceName = "Directory Service Data" @@ -86,52 +86,54 @@ public class DirectoryServiceDataClient: ClientRuntime.Client { } extension DirectoryServiceDataClient { + public class DirectoryServiceDataClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension DirectoryServiceDataClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: DirectoryServiceDataClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultDirectoryServiceDataAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultDirectoryServiceDataAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultDirectoryServiceDataAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultDirectoryServiceDataAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultDirectoryServiceDataAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultDirectoryServiceDataAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(DirectoryServiceDataClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSDocDB/Sources/AWSDocDB/DocDBClient.swift b/Sources/Services/AWSDocDB/Sources/AWSDocDB/DocDBClient.swift index c059e557fd8..0921f7cad68 100644 --- a/Sources/Services/AWSDocDB/Sources/AWSDocDB/DocDBClient.swift +++ b/Sources/Services/AWSDocDB/Sources/AWSDocDB/DocDBClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class DocDBClient: ClientRuntime.Client { public static let clientName = "DocDBClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: DocDBClient.DocDBClientConfiguration let serviceName = "DocDB" @@ -85,52 +85,54 @@ public class DocDBClient: ClientRuntime.Client { } extension DocDBClient { + public class DocDBClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension DocDBClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: DocDBClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultDocDBAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultDocDBAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultDocDBAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultDocDBAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultDocDBAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultDocDBAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(DocDBClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSDocDBElastic/Sources/AWSDocDBElastic/DocDBElasticClient.swift b/Sources/Services/AWSDocDBElastic/Sources/AWSDocDBElastic/DocDBElasticClient.swift index e23cb0f00cb..5c87264e86f 100644 --- a/Sources/Services/AWSDocDBElastic/Sources/AWSDocDBElastic/DocDBElasticClient.swift +++ b/Sources/Services/AWSDocDBElastic/Sources/AWSDocDBElastic/DocDBElasticClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class DocDBElasticClient: ClientRuntime.Client { public static let clientName = "DocDBElasticClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: DocDBElasticClient.DocDBElasticClientConfiguration let serviceName = "DocDB Elastic" @@ -86,52 +86,54 @@ public class DocDBElasticClient: ClientRuntime.Client { } extension DocDBElasticClient { + public class DocDBElasticClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension DocDBElasticClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: DocDBElasticClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultDocDBElasticAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultDocDBElasticAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultDocDBElasticAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultDocDBElasticAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultDocDBElasticAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultDocDBElasticAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(DocDBElasticClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSDrs/Sources/AWSDrs/DrsClient.swift b/Sources/Services/AWSDrs/Sources/AWSDrs/DrsClient.swift index 2bfe46ed531..00eaebc472a 100644 --- a/Sources/Services/AWSDrs/Sources/AWSDrs/DrsClient.swift +++ b/Sources/Services/AWSDrs/Sources/AWSDrs/DrsClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class DrsClient: ClientRuntime.Client { public static let clientName = "DrsClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: DrsClient.DrsClientConfiguration let serviceName = "drs" @@ -85,52 +85,54 @@ public class DrsClient: ClientRuntime.Client { } extension DrsClient { + public class DrsClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension DrsClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: DrsClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultDrsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultDrsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultDrsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultDrsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultDrsAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultDrsAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(DrsClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSDynamoDB/Sources/AWSDynamoDB/DynamoDBClient.swift b/Sources/Services/AWSDynamoDB/Sources/AWSDynamoDB/DynamoDBClient.swift index c0084ebc18f..2f791ac0084 100644 --- a/Sources/Services/AWSDynamoDB/Sources/AWSDynamoDB/DynamoDBClient.swift +++ b/Sources/Services/AWSDynamoDB/Sources/AWSDynamoDB/DynamoDBClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class DynamoDBClient: ClientRuntime.Client { public static let clientName = "DynamoDBClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: DynamoDBClient.DynamoDBClientConfiguration let serviceName = "DynamoDB" @@ -87,56 +87,58 @@ public class DynamoDBClient: ClientRuntime.Client { } extension DynamoDBClient { + public class DynamoDBClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var accountId: Swift.String? - public var accountIdEndpointMode: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ accountId: Swift.String?, _ accountIdEndpointMode: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ accountId: Swift.String?, + _ accountIdEndpointMode: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -163,25 +165,170 @@ extension DynamoDBClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: DynamoDBClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, accountId: Swift.String? = nil, accountIdEndpointMode: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, accountId, accountIdEndpointMode, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultDynamoDBAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + accountId: Swift.String? = nil, + accountIdEndpointMode: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + accountId, + accountIdEndpointMode, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultDynamoDBAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, accountId: Swift.String? = nil, accountIdEndpointMode: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), accountId, accountIdEndpointMode, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultDynamoDBAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + accountId: Swift.String? = nil, + accountIdEndpointMode: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + accountId, + accountIdEndpointMode, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultDynamoDBAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, accountId: nil, accountIdEndpointMode: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + accountId: nil, + accountIdEndpointMode: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, nil, nil, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultDynamoDBAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + nil, + nil, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultDynamoDBAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(DynamoDBClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSDynamoDBStreams/Sources/AWSDynamoDBStreams/DynamoDBStreamsClient.swift b/Sources/Services/AWSDynamoDBStreams/Sources/AWSDynamoDBStreams/DynamoDBStreamsClient.swift index a1657bc6778..0413f41451e 100644 --- a/Sources/Services/AWSDynamoDBStreams/Sources/AWSDynamoDBStreams/DynamoDBStreamsClient.swift +++ b/Sources/Services/AWSDynamoDBStreams/Sources/AWSDynamoDBStreams/DynamoDBStreamsClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class DynamoDBStreamsClient: ClientRuntime.Client { public static let clientName = "DynamoDBStreamsClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: DynamoDBStreamsClient.DynamoDBStreamsClientConfiguration let serviceName = "DynamoDB Streams" @@ -85,52 +85,54 @@ public class DynamoDBStreamsClient: ClientRuntime.Client { } extension DynamoDBStreamsClient { + public class DynamoDBStreamsClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension DynamoDBStreamsClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: DynamoDBStreamsClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultDynamoDBStreamsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultDynamoDBStreamsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultDynamoDBStreamsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultDynamoDBStreamsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultDynamoDBStreamsAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultDynamoDBStreamsAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(DynamoDBStreamsClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSEBS/Sources/AWSEBS/EBSClient.swift b/Sources/Services/AWSEBS/Sources/AWSEBS/EBSClient.swift index a92cc53e363..bec76fc23a2 100644 --- a/Sources/Services/AWSEBS/Sources/AWSEBS/EBSClient.swift +++ b/Sources/Services/AWSEBS/Sources/AWSEBS/EBSClient.swift @@ -69,7 +69,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class EBSClient: ClientRuntime.Client { public static let clientName = "EBSClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: EBSClient.EBSClientConfiguration let serviceName = "EBS" @@ -91,52 +91,54 @@ public class EBSClient: ClientRuntime.Client { } extension EBSClient { + public class EBSClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -161,25 +163,158 @@ extension EBSClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: EBSClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultEBSAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultEBSAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultEBSAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultEBSAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultEBSAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultEBSAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(EBSClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSEC2/Sources/AWSEC2/EC2Client.swift b/Sources/Services/AWSEC2/Sources/AWSEC2/EC2Client.swift index ae10db04582..5f2db052ebc 100644 --- a/Sources/Services/AWSEC2/Sources/AWSEC2/EC2Client.swift +++ b/Sources/Services/AWSEC2/Sources/AWSEC2/EC2Client.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class EC2Client: ClientRuntime.Client { public static let clientName = "EC2Client" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: EC2Client.EC2ClientConfiguration let serviceName = "EC2" @@ -86,52 +86,54 @@ public class EC2Client: ClientRuntime.Client { } extension EC2Client { + public class EC2ClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension EC2Client { self.logger = telemetryProvider.loggerProvider.getLogger(name: EC2Client.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultEC2AuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultEC2AuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultEC2AuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultEC2AuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultEC2AuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultEC2AuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(EC2Client.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSEC2InstanceConnect/Sources/AWSEC2InstanceConnect/EC2InstanceConnectClient.swift b/Sources/Services/AWSEC2InstanceConnect/Sources/AWSEC2InstanceConnect/EC2InstanceConnectClient.swift index 681551eac37..bc9cd2e5b73 100644 --- a/Sources/Services/AWSEC2InstanceConnect/Sources/AWSEC2InstanceConnect/EC2InstanceConnectClient.swift +++ b/Sources/Services/AWSEC2InstanceConnect/Sources/AWSEC2InstanceConnect/EC2InstanceConnectClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class EC2InstanceConnectClient: ClientRuntime.Client { public static let clientName = "EC2InstanceConnectClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: EC2InstanceConnectClient.EC2InstanceConnectClientConfiguration let serviceName = "EC2 Instance Connect" @@ -85,52 +85,54 @@ public class EC2InstanceConnectClient: ClientRuntime.Client { } extension EC2InstanceConnectClient { + public class EC2InstanceConnectClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension EC2InstanceConnectClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: EC2InstanceConnectClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultEC2InstanceConnectAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultEC2InstanceConnectAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultEC2InstanceConnectAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultEC2InstanceConnectAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultEC2InstanceConnectAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultEC2InstanceConnectAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(EC2InstanceConnectClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSECR/Sources/AWSECR/ECRClient.swift b/Sources/Services/AWSECR/Sources/AWSECR/ECRClient.swift index a6a6b8eee03..c779b333545 100644 --- a/Sources/Services/AWSECR/Sources/AWSECR/ECRClient.swift +++ b/Sources/Services/AWSECR/Sources/AWSECR/ECRClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ECRClient: ClientRuntime.Client { public static let clientName = "ECRClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ECRClient.ECRClientConfiguration let serviceName = "ECR" @@ -86,52 +86,54 @@ public class ECRClient: ClientRuntime.Client { } extension ECRClient { + public class ECRClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension ECRClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: ECRClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultECRAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultECRAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultECRAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultECRAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultECRAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultECRAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ECRClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSECRPUBLIC/Sources/AWSECRPUBLIC/ECRPUBLICClient.swift b/Sources/Services/AWSECRPUBLIC/Sources/AWSECRPUBLIC/ECRPUBLICClient.swift index 5118ad11084..cf7f71c0f3d 100644 --- a/Sources/Services/AWSECRPUBLIC/Sources/AWSECRPUBLIC/ECRPUBLICClient.swift +++ b/Sources/Services/AWSECRPUBLIC/Sources/AWSECRPUBLIC/ECRPUBLICClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ECRPUBLICClient: ClientRuntime.Client { public static let clientName = "ECRPUBLICClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ECRPUBLICClient.ECRPUBLICClientConfiguration let serviceName = "ECR PUBLIC" @@ -86,52 +86,54 @@ public class ECRPUBLICClient: ClientRuntime.Client { } extension ECRPUBLICClient { + public class ECRPUBLICClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension ECRPUBLICClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: ECRPUBLICClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultECRPUBLICAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultECRPUBLICAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultECRPUBLICAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultECRPUBLICAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultECRPUBLICAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultECRPUBLICAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ECRPUBLICClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSECS/Sources/AWSECS/ECSClient.swift b/Sources/Services/AWSECS/Sources/AWSECS/ECSClient.swift index 021f9bdf118..1f242f6f1a3 100644 --- a/Sources/Services/AWSECS/Sources/AWSECS/ECSClient.swift +++ b/Sources/Services/AWSECS/Sources/AWSECS/ECSClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ECSClient: ClientRuntime.Client { public static let clientName = "ECSClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ECSClient.ECSClientConfiguration let serviceName = "ECS" @@ -87,52 +87,54 @@ public class ECSClient: ClientRuntime.Client { } extension ECSClient { + public class ECSClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension ECSClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: ECSClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultECSAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultECSAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultECSAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultECSAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultECSAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultECSAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ECSClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSEFS/Sources/AWSEFS/EFSClient.swift b/Sources/Services/AWSEFS/Sources/AWSEFS/EFSClient.swift index 29fecb3c1b8..4c80e0341f8 100644 --- a/Sources/Services/AWSEFS/Sources/AWSEFS/EFSClient.swift +++ b/Sources/Services/AWSEFS/Sources/AWSEFS/EFSClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class EFSClient: ClientRuntime.Client { public static let clientName = "EFSClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: EFSClient.EFSClientConfiguration let serviceName = "EFS" @@ -87,52 +87,54 @@ public class EFSClient: ClientRuntime.Client { } extension EFSClient { + public class EFSClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension EFSClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: EFSClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultEFSAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultEFSAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultEFSAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultEFSAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultEFSAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultEFSAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(EFSClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSEKS/Sources/AWSEKS/EKSClient.swift b/Sources/Services/AWSEKS/Sources/AWSEKS/EKSClient.swift index d8cae5efbfc..abf22ca5abe 100644 --- a/Sources/Services/AWSEKS/Sources/AWSEKS/EKSClient.swift +++ b/Sources/Services/AWSEKS/Sources/AWSEKS/EKSClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class EKSClient: ClientRuntime.Client { public static let clientName = "EKSClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: EKSClient.EKSClientConfiguration let serviceName = "EKS" @@ -86,52 +86,54 @@ public class EKSClient: ClientRuntime.Client { } extension EKSClient { + public class EKSClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension EKSClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: EKSClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultEKSAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultEKSAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultEKSAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultEKSAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultEKSAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultEKSAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(EKSClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSEKSAuth/Sources/AWSEKSAuth/EKSAuthClient.swift b/Sources/Services/AWSEKSAuth/Sources/AWSEKSAuth/EKSAuthClient.swift index 0a7682448a1..6242547b4c3 100644 --- a/Sources/Services/AWSEKSAuth/Sources/AWSEKSAuth/EKSAuthClient.swift +++ b/Sources/Services/AWSEKSAuth/Sources/AWSEKSAuth/EKSAuthClient.swift @@ -62,7 +62,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class EKSAuthClient: ClientRuntime.Client { public static let clientName = "EKSAuthClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: EKSAuthClient.EKSAuthClientConfiguration let serviceName = "EKS Auth" @@ -84,52 +84,54 @@ public class EKSAuthClient: ClientRuntime.Client { } extension EKSAuthClient { + public class EKSAuthClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -154,25 +156,158 @@ extension EKSAuthClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: EKSAuthClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultEKSAuthAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultEKSAuthAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultEKSAuthAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultEKSAuthAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultEKSAuthAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultEKSAuthAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(EKSAuthClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSEMR/Sources/AWSEMR/EMRClient.swift b/Sources/Services/AWSEMR/Sources/AWSEMR/EMRClient.swift index 7a6d6f9c238..741b147162a 100644 --- a/Sources/Services/AWSEMR/Sources/AWSEMR/EMRClient.swift +++ b/Sources/Services/AWSEMR/Sources/AWSEMR/EMRClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class EMRClient: ClientRuntime.Client { public static let clientName = "EMRClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: EMRClient.EMRClientConfiguration let serviceName = "EMR" @@ -86,52 +86,54 @@ public class EMRClient: ClientRuntime.Client { } extension EMRClient { + public class EMRClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension EMRClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: EMRClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultEMRAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultEMRAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultEMRAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultEMRAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultEMRAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultEMRAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(EMRClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSEMRServerless/Sources/AWSEMRServerless/EMRServerlessClient.swift b/Sources/Services/AWSEMRServerless/Sources/AWSEMRServerless/EMRServerlessClient.swift index 5476f650b4f..d9064d90405 100644 --- a/Sources/Services/AWSEMRServerless/Sources/AWSEMRServerless/EMRServerlessClient.swift +++ b/Sources/Services/AWSEMRServerless/Sources/AWSEMRServerless/EMRServerlessClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class EMRServerlessClient: ClientRuntime.Client { public static let clientName = "EMRServerlessClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: EMRServerlessClient.EMRServerlessClientConfiguration let serviceName = "EMR Serverless" @@ -87,52 +87,54 @@ public class EMRServerlessClient: ClientRuntime.Client { } extension EMRServerlessClient { + public class EMRServerlessClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension EMRServerlessClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: EMRServerlessClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultEMRServerlessAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultEMRServerlessAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultEMRServerlessAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultEMRServerlessAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultEMRServerlessAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultEMRServerlessAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(EMRServerlessClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSEMRcontainers/Sources/AWSEMRcontainers/EMRcontainersClient.swift b/Sources/Services/AWSEMRcontainers/Sources/AWSEMRcontainers/EMRcontainersClient.swift index 0cee36cdbc9..7bbf2dc937e 100644 --- a/Sources/Services/AWSEMRcontainers/Sources/AWSEMRcontainers/EMRcontainersClient.swift +++ b/Sources/Services/AWSEMRcontainers/Sources/AWSEMRcontainers/EMRcontainersClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class EMRcontainersClient: ClientRuntime.Client { public static let clientName = "EMRcontainersClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: EMRcontainersClient.EMRcontainersClientConfiguration let serviceName = "EMR containers" @@ -87,52 +87,54 @@ public class EMRcontainersClient: ClientRuntime.Client { } extension EMRcontainersClient { + public class EMRcontainersClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension EMRcontainersClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: EMRcontainersClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultEMRcontainersAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultEMRcontainersAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultEMRcontainersAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultEMRcontainersAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultEMRcontainersAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultEMRcontainersAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(EMRcontainersClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSElastiCache/Sources/AWSElastiCache/ElastiCacheClient.swift b/Sources/Services/AWSElastiCache/Sources/AWSElastiCache/ElastiCacheClient.swift index 1982ddf8457..4617a99620e 100644 --- a/Sources/Services/AWSElastiCache/Sources/AWSElastiCache/ElastiCacheClient.swift +++ b/Sources/Services/AWSElastiCache/Sources/AWSElastiCache/ElastiCacheClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ElastiCacheClient: ClientRuntime.Client { public static let clientName = "ElastiCacheClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ElastiCacheClient.ElastiCacheClientConfiguration let serviceName = "ElastiCache" @@ -85,52 +85,54 @@ public class ElastiCacheClient: ClientRuntime.Client { } extension ElastiCacheClient { + public class ElastiCacheClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension ElastiCacheClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: ElastiCacheClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultElastiCacheAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultElastiCacheAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultElastiCacheAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultElastiCacheAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultElastiCacheAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultElastiCacheAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ElastiCacheClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSElasticBeanstalk/Sources/AWSElasticBeanstalk/ElasticBeanstalkClient.swift b/Sources/Services/AWSElasticBeanstalk/Sources/AWSElasticBeanstalk/ElasticBeanstalkClient.swift index d5bf7f4d1e9..6d14174b3eb 100644 --- a/Sources/Services/AWSElasticBeanstalk/Sources/AWSElasticBeanstalk/ElasticBeanstalkClient.swift +++ b/Sources/Services/AWSElasticBeanstalk/Sources/AWSElasticBeanstalk/ElasticBeanstalkClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ElasticBeanstalkClient: ClientRuntime.Client { public static let clientName = "ElasticBeanstalkClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ElasticBeanstalkClient.ElasticBeanstalkClientConfiguration let serviceName = "Elastic Beanstalk" @@ -85,52 +85,54 @@ public class ElasticBeanstalkClient: ClientRuntime.Client { } extension ElasticBeanstalkClient { + public class ElasticBeanstalkClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension ElasticBeanstalkClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: ElasticBeanstalkClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultElasticBeanstalkAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultElasticBeanstalkAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultElasticBeanstalkAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultElasticBeanstalkAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultElasticBeanstalkAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultElasticBeanstalkAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ElasticBeanstalkClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSElasticInference/Sources/AWSElasticInference/ElasticInferenceClient.swift b/Sources/Services/AWSElasticInference/Sources/AWSElasticInference/ElasticInferenceClient.swift index 031349bb27e..570f127c117 100644 --- a/Sources/Services/AWSElasticInference/Sources/AWSElasticInference/ElasticInferenceClient.swift +++ b/Sources/Services/AWSElasticInference/Sources/AWSElasticInference/ElasticInferenceClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ElasticInferenceClient: ClientRuntime.Client { public static let clientName = "ElasticInferenceClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ElasticInferenceClient.ElasticInferenceClientConfiguration let serviceName = "Elastic Inference" @@ -85,52 +85,54 @@ public class ElasticInferenceClient: ClientRuntime.Client { } extension ElasticInferenceClient { + public class ElasticInferenceClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension ElasticInferenceClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: ElasticInferenceClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultElasticInferenceAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultElasticInferenceAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultElasticInferenceAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultElasticInferenceAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultElasticInferenceAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultElasticInferenceAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ElasticInferenceClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSElasticLoadBalancing/Sources/AWSElasticLoadBalancing/ElasticLoadBalancingClient.swift b/Sources/Services/AWSElasticLoadBalancing/Sources/AWSElasticLoadBalancing/ElasticLoadBalancingClient.swift index 4a668b30ef5..eec3c8a81c5 100644 --- a/Sources/Services/AWSElasticLoadBalancing/Sources/AWSElasticLoadBalancing/ElasticLoadBalancingClient.swift +++ b/Sources/Services/AWSElasticLoadBalancing/Sources/AWSElasticLoadBalancing/ElasticLoadBalancingClient.swift @@ -62,7 +62,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ElasticLoadBalancingClient: ClientRuntime.Client { public static let clientName = "ElasticLoadBalancingClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ElasticLoadBalancingClient.ElasticLoadBalancingClientConfiguration let serviceName = "Elastic Load Balancing" @@ -84,52 +84,54 @@ public class ElasticLoadBalancingClient: ClientRuntime.Client { } extension ElasticLoadBalancingClient { + public class ElasticLoadBalancingClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -154,25 +156,158 @@ extension ElasticLoadBalancingClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: ElasticLoadBalancingClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultElasticLoadBalancingAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultElasticLoadBalancingAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultElasticLoadBalancingAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultElasticLoadBalancingAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultElasticLoadBalancingAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultElasticLoadBalancingAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ElasticLoadBalancingClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSElasticLoadBalancingv2/Sources/AWSElasticLoadBalancingv2/ElasticLoadBalancingv2Client.swift b/Sources/Services/AWSElasticLoadBalancingv2/Sources/AWSElasticLoadBalancingv2/ElasticLoadBalancingv2Client.swift index 6d2ba03fceb..6e1d853e73e 100644 --- a/Sources/Services/AWSElasticLoadBalancingv2/Sources/AWSElasticLoadBalancingv2/ElasticLoadBalancingv2Client.swift +++ b/Sources/Services/AWSElasticLoadBalancingv2/Sources/AWSElasticLoadBalancingv2/ElasticLoadBalancingv2Client.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ElasticLoadBalancingv2Client: ClientRuntime.Client { public static let clientName = "ElasticLoadBalancingv2Client" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ElasticLoadBalancingv2Client.ElasticLoadBalancingv2ClientConfiguration let serviceName = "Elastic Load Balancing v2" @@ -85,52 +85,54 @@ public class ElasticLoadBalancingv2Client: ClientRuntime.Client { } extension ElasticLoadBalancingv2Client { + public class ElasticLoadBalancingv2ClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension ElasticLoadBalancingv2Client { self.logger = telemetryProvider.loggerProvider.getLogger(name: ElasticLoadBalancingv2Client.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultElasticLoadBalancingv2AuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultElasticLoadBalancingv2AuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultElasticLoadBalancingv2AuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultElasticLoadBalancingv2AuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultElasticLoadBalancingv2AuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultElasticLoadBalancingv2AuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ElasticLoadBalancingv2Client.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSElasticTranscoder/Sources/AWSElasticTranscoder/ElasticTranscoderClient.swift b/Sources/Services/AWSElasticTranscoder/Sources/AWSElasticTranscoder/ElasticTranscoderClient.swift index b1477d9a36a..d959ada9312 100644 --- a/Sources/Services/AWSElasticTranscoder/Sources/AWSElasticTranscoder/ElasticTranscoderClient.swift +++ b/Sources/Services/AWSElasticTranscoder/Sources/AWSElasticTranscoder/ElasticTranscoderClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ElasticTranscoderClient: ClientRuntime.Client { public static let clientName = "ElasticTranscoderClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ElasticTranscoderClient.ElasticTranscoderClientConfiguration let serviceName = "Elastic Transcoder" @@ -85,52 +85,54 @@ public class ElasticTranscoderClient: ClientRuntime.Client { } extension ElasticTranscoderClient { + public class ElasticTranscoderClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension ElasticTranscoderClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: ElasticTranscoderClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultElasticTranscoderAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultElasticTranscoderAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultElasticTranscoderAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultElasticTranscoderAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultElasticTranscoderAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultElasticTranscoderAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ElasticTranscoderClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSElasticsearchService/Sources/AWSElasticsearchService/ElasticsearchClient.swift b/Sources/Services/AWSElasticsearchService/Sources/AWSElasticsearchService/ElasticsearchClient.swift index b622846e120..1efe85d5eb2 100644 --- a/Sources/Services/AWSElasticsearchService/Sources/AWSElasticsearchService/ElasticsearchClient.swift +++ b/Sources/Services/AWSElasticsearchService/Sources/AWSElasticsearchService/ElasticsearchClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ElasticsearchClient: ClientRuntime.Client { public static let clientName = "ElasticsearchClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ElasticsearchClient.ElasticsearchClientConfiguration let serviceName = "Elasticsearch" @@ -85,52 +85,54 @@ public class ElasticsearchClient: ClientRuntime.Client { } extension ElasticsearchClient { + public class ElasticsearchClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension ElasticsearchClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: ElasticsearchClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultElasticsearchServiceAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultElasticsearchServiceAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultElasticsearchServiceAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultElasticsearchServiceAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultElasticsearchServiceAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultElasticsearchServiceAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ElasticsearchClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSEntityResolution/Sources/AWSEntityResolution/EntityResolutionClient.swift b/Sources/Services/AWSEntityResolution/Sources/AWSEntityResolution/EntityResolutionClient.swift index 89ef7b14e78..94b5aa8ff67 100644 --- a/Sources/Services/AWSEntityResolution/Sources/AWSEntityResolution/EntityResolutionClient.swift +++ b/Sources/Services/AWSEntityResolution/Sources/AWSEntityResolution/EntityResolutionClient.swift @@ -66,7 +66,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class EntityResolutionClient: ClientRuntime.Client { public static let clientName = "EntityResolutionClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: EntityResolutionClient.EntityResolutionClientConfiguration let serviceName = "EntityResolution" @@ -88,52 +88,54 @@ public class EntityResolutionClient: ClientRuntime.Client { } extension EntityResolutionClient { + public class EntityResolutionClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -158,25 +160,158 @@ extension EntityResolutionClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: EntityResolutionClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultEntityResolutionAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultEntityResolutionAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultEntityResolutionAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultEntityResolutionAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultEntityResolutionAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultEntityResolutionAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(EntityResolutionClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSEventBridge/Sources/AWSEventBridge/EventBridgeClient.swift b/Sources/Services/AWSEventBridge/Sources/AWSEventBridge/EventBridgeClient.swift index 100c2f19c37..3e7d2234c8d 100644 --- a/Sources/Services/AWSEventBridge/Sources/AWSEventBridge/EventBridgeClient.swift +++ b/Sources/Services/AWSEventBridge/Sources/AWSEventBridge/EventBridgeClient.swift @@ -66,7 +66,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class EventBridgeClient: ClientRuntime.Client { public static let clientName = "EventBridgeClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: EventBridgeClient.EventBridgeClientConfiguration let serviceName = "EventBridge" @@ -88,52 +88,54 @@ public class EventBridgeClient: ClientRuntime.Client { } extension EventBridgeClient { + public class EventBridgeClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -158,25 +160,158 @@ extension EventBridgeClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: EventBridgeClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme(), AWSSDKHTTPAuth.SigV4AAuthScheme()], authSchemeResolver ?? DefaultEventBridgeAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme(), AWSSDKHTTPAuth.SigV4AAuthScheme()], + authSchemeResolver ?? DefaultEventBridgeAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme(), AWSSDKHTTPAuth.SigV4AAuthScheme()], authSchemeResolver ?? DefaultEventBridgeAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme(), AWSSDKHTTPAuth.SigV4AAuthScheme()], + authSchemeResolver ?? DefaultEventBridgeAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme(), AWSSDKHTTPAuth.SigV4AAuthScheme()], DefaultEventBridgeAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme(), AWSSDKHTTPAuth.SigV4AAuthScheme()], + DefaultEventBridgeAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(EventBridgeClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSEvidently/Sources/AWSEvidently/EvidentlyClient.swift b/Sources/Services/AWSEvidently/Sources/AWSEvidently/EvidentlyClient.swift index 8c19fe813fa..81afd321aa9 100644 --- a/Sources/Services/AWSEvidently/Sources/AWSEvidently/EvidentlyClient.swift +++ b/Sources/Services/AWSEvidently/Sources/AWSEvidently/EvidentlyClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class EvidentlyClient: ClientRuntime.Client { public static let clientName = "EvidentlyClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: EvidentlyClient.EvidentlyClientConfiguration let serviceName = "Evidently" @@ -86,52 +86,54 @@ public class EvidentlyClient: ClientRuntime.Client { } extension EvidentlyClient { + public class EvidentlyClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension EvidentlyClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: EvidentlyClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultEvidentlyAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultEvidentlyAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultEvidentlyAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultEvidentlyAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultEvidentlyAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultEvidentlyAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(EvidentlyClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSFMS/Sources/AWSFMS/FMSClient.swift b/Sources/Services/AWSFMS/Sources/AWSFMS/FMSClient.swift index 5cc8d8fb718..0c8e95b82b6 100644 --- a/Sources/Services/AWSFMS/Sources/AWSFMS/FMSClient.swift +++ b/Sources/Services/AWSFMS/Sources/AWSFMS/FMSClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class FMSClient: ClientRuntime.Client { public static let clientName = "FMSClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: FMSClient.FMSClientConfiguration let serviceName = "FMS" @@ -86,52 +86,54 @@ public class FMSClient: ClientRuntime.Client { } extension FMSClient { + public class FMSClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension FMSClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: FMSClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultFMSAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultFMSAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultFMSAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultFMSAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultFMSAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultFMSAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(FMSClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSFSx/Sources/AWSFSx/FSxClient.swift b/Sources/Services/AWSFSx/Sources/AWSFSx/FSxClient.swift index b26a0d25bda..853b16c316d 100644 --- a/Sources/Services/AWSFSx/Sources/AWSFSx/FSxClient.swift +++ b/Sources/Services/AWSFSx/Sources/AWSFSx/FSxClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class FSxClient: ClientRuntime.Client { public static let clientName = "FSxClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: FSxClient.FSxClientConfiguration let serviceName = "FSx" @@ -86,52 +86,54 @@ public class FSxClient: ClientRuntime.Client { } extension FSxClient { + public class FSxClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension FSxClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: FSxClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultFSxAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultFSxAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultFSxAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultFSxAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultFSxAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultFSxAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(FSxClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSFinspace/Sources/AWSFinspace/FinspaceClient.swift b/Sources/Services/AWSFinspace/Sources/AWSFinspace/FinspaceClient.swift index d483916a8d0..def569c2cc6 100644 --- a/Sources/Services/AWSFinspace/Sources/AWSFinspace/FinspaceClient.swift +++ b/Sources/Services/AWSFinspace/Sources/AWSFinspace/FinspaceClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class FinspaceClient: ClientRuntime.Client { public static let clientName = "FinspaceClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: FinspaceClient.FinspaceClientConfiguration let serviceName = "finspace" @@ -87,52 +87,54 @@ public class FinspaceClient: ClientRuntime.Client { } extension FinspaceClient { + public class FinspaceClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension FinspaceClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: FinspaceClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultFinspaceAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultFinspaceAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultFinspaceAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultFinspaceAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultFinspaceAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultFinspaceAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(FinspaceClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSFinspacedata/Sources/AWSFinspacedata/FinspacedataClient.swift b/Sources/Services/AWSFinspacedata/Sources/AWSFinspacedata/FinspacedataClient.swift index 1df141aaa5d..259b9f64862 100644 --- a/Sources/Services/AWSFinspacedata/Sources/AWSFinspacedata/FinspacedataClient.swift +++ b/Sources/Services/AWSFinspacedata/Sources/AWSFinspacedata/FinspacedataClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class FinspacedataClient: ClientRuntime.Client { public static let clientName = "FinspacedataClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: FinspacedataClient.FinspacedataClientConfiguration let serviceName = "finspace data" @@ -86,52 +86,54 @@ public class FinspacedataClient: ClientRuntime.Client { } extension FinspacedataClient { + public class FinspacedataClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension FinspacedataClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: FinspacedataClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultFinspacedataAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultFinspacedataAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultFinspacedataAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultFinspacedataAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultFinspacedataAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultFinspacedataAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(FinspacedataClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSFirehose/Sources/AWSFirehose/FirehoseClient.swift b/Sources/Services/AWSFirehose/Sources/AWSFirehose/FirehoseClient.swift index ea6009342de..45e09b37e7a 100644 --- a/Sources/Services/AWSFirehose/Sources/AWSFirehose/FirehoseClient.swift +++ b/Sources/Services/AWSFirehose/Sources/AWSFirehose/FirehoseClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class FirehoseClient: ClientRuntime.Client { public static let clientName = "FirehoseClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: FirehoseClient.FirehoseClientConfiguration let serviceName = "Firehose" @@ -85,52 +85,54 @@ public class FirehoseClient: ClientRuntime.Client { } extension FirehoseClient { + public class FirehoseClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension FirehoseClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: FirehoseClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultFirehoseAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultFirehoseAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultFirehoseAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultFirehoseAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultFirehoseAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultFirehoseAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(FirehoseClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSFis/Sources/AWSFis/FisClient.swift b/Sources/Services/AWSFis/Sources/AWSFis/FisClient.swift index 4f2332ed49f..166f95f81e4 100644 --- a/Sources/Services/AWSFis/Sources/AWSFis/FisClient.swift +++ b/Sources/Services/AWSFis/Sources/AWSFis/FisClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class FisClient: ClientRuntime.Client { public static let clientName = "FisClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: FisClient.FisClientConfiguration let serviceName = "fis" @@ -86,52 +86,54 @@ public class FisClient: ClientRuntime.Client { } extension FisClient { + public class FisClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension FisClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: FisClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultFisAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultFisAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultFisAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultFisAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultFisAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultFisAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(FisClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSForecast/Sources/AWSForecast/ForecastClient.swift b/Sources/Services/AWSForecast/Sources/AWSForecast/ForecastClient.swift index 197ac0d1360..8f35f5c7d33 100644 --- a/Sources/Services/AWSForecast/Sources/AWSForecast/ForecastClient.swift +++ b/Sources/Services/AWSForecast/Sources/AWSForecast/ForecastClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ForecastClient: ClientRuntime.Client { public static let clientName = "ForecastClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ForecastClient.ForecastClientConfiguration let serviceName = "forecast" @@ -86,52 +86,54 @@ public class ForecastClient: ClientRuntime.Client { } extension ForecastClient { + public class ForecastClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension ForecastClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: ForecastClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultForecastAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultForecastAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultForecastAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultForecastAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultForecastAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultForecastAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ForecastClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSForecastquery/Sources/AWSForecastquery/ForecastqueryClient.swift b/Sources/Services/AWSForecastquery/Sources/AWSForecastquery/ForecastqueryClient.swift index fdfc3f7ce3c..0bdc79a2ca0 100644 --- a/Sources/Services/AWSForecastquery/Sources/AWSForecastquery/ForecastqueryClient.swift +++ b/Sources/Services/AWSForecastquery/Sources/AWSForecastquery/ForecastqueryClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ForecastqueryClient: ClientRuntime.Client { public static let clientName = "ForecastqueryClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ForecastqueryClient.ForecastqueryClientConfiguration let serviceName = "forecastquery" @@ -85,52 +85,54 @@ public class ForecastqueryClient: ClientRuntime.Client { } extension ForecastqueryClient { + public class ForecastqueryClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension ForecastqueryClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: ForecastqueryClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultForecastqueryAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultForecastqueryAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultForecastqueryAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultForecastqueryAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultForecastqueryAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultForecastqueryAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ForecastqueryClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSFraudDetector/Sources/AWSFraudDetector/FraudDetectorClient.swift b/Sources/Services/AWSFraudDetector/Sources/AWSFraudDetector/FraudDetectorClient.swift index 2e44db212bb..06ccdd56bfa 100644 --- a/Sources/Services/AWSFraudDetector/Sources/AWSFraudDetector/FraudDetectorClient.swift +++ b/Sources/Services/AWSFraudDetector/Sources/AWSFraudDetector/FraudDetectorClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class FraudDetectorClient: ClientRuntime.Client { public static let clientName = "FraudDetectorClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: FraudDetectorClient.FraudDetectorClientConfiguration let serviceName = "FraudDetector" @@ -85,52 +85,54 @@ public class FraudDetectorClient: ClientRuntime.Client { } extension FraudDetectorClient { + public class FraudDetectorClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension FraudDetectorClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: FraudDetectorClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultFraudDetectorAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultFraudDetectorAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultFraudDetectorAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultFraudDetectorAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultFraudDetectorAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultFraudDetectorAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(FraudDetectorClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSFreeTier/Sources/AWSFreeTier/FreeTierClient.swift b/Sources/Services/AWSFreeTier/Sources/AWSFreeTier/FreeTierClient.swift index 69266cfb028..cb23b1c63c2 100644 --- a/Sources/Services/AWSFreeTier/Sources/AWSFreeTier/FreeTierClient.swift +++ b/Sources/Services/AWSFreeTier/Sources/AWSFreeTier/FreeTierClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class FreeTierClient: ClientRuntime.Client { public static let clientName = "FreeTierClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: FreeTierClient.FreeTierClientConfiguration let serviceName = "FreeTier" @@ -85,52 +85,54 @@ public class FreeTierClient: ClientRuntime.Client { } extension FreeTierClient { + public class FreeTierClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension FreeTierClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: FreeTierClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultFreeTierAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultFreeTierAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultFreeTierAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultFreeTierAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultFreeTierAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultFreeTierAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(FreeTierClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSGameLift/Sources/AWSGameLift/GameLiftClient.swift b/Sources/Services/AWSGameLift/Sources/AWSGameLift/GameLiftClient.swift index 7dd8b6ba4e0..cc1a02e3df3 100644 --- a/Sources/Services/AWSGameLift/Sources/AWSGameLift/GameLiftClient.swift +++ b/Sources/Services/AWSGameLift/Sources/AWSGameLift/GameLiftClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class GameLiftClient: ClientRuntime.Client { public static let clientName = "GameLiftClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: GameLiftClient.GameLiftClientConfiguration let serviceName = "GameLift" @@ -86,52 +86,54 @@ public class GameLiftClient: ClientRuntime.Client { } extension GameLiftClient { + public class GameLiftClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension GameLiftClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: GameLiftClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultGameLiftAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultGameLiftAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultGameLiftAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultGameLiftAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultGameLiftAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultGameLiftAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(GameLiftClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSGeoMaps/Sources/AWSGeoMaps/GeoMapsClient.swift b/Sources/Services/AWSGeoMaps/Sources/AWSGeoMaps/GeoMapsClient.swift index 70d3424f76c..490868ce36f 100644 --- a/Sources/Services/AWSGeoMaps/Sources/AWSGeoMaps/GeoMapsClient.swift +++ b/Sources/Services/AWSGeoMaps/Sources/AWSGeoMaps/GeoMapsClient.swift @@ -59,7 +59,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class GeoMapsClient: ClientRuntime.Client { public static let clientName = "GeoMapsClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: GeoMapsClient.GeoMapsClientConfiguration let serviceName = "Geo Maps" @@ -81,52 +81,54 @@ public class GeoMapsClient: ClientRuntime.Client { } extension GeoMapsClient { + public class GeoMapsClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -151,25 +153,158 @@ extension GeoMapsClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: GeoMapsClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultGeoMapsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultGeoMapsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultGeoMapsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultGeoMapsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultGeoMapsAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultGeoMapsAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(GeoMapsClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSGeoPlaces/Sources/AWSGeoPlaces/GeoPlacesClient.swift b/Sources/Services/AWSGeoPlaces/Sources/AWSGeoPlaces/GeoPlacesClient.swift index 2221d1bf75e..8ac71d5886e 100644 --- a/Sources/Services/AWSGeoPlaces/Sources/AWSGeoPlaces/GeoPlacesClient.swift +++ b/Sources/Services/AWSGeoPlaces/Sources/AWSGeoPlaces/GeoPlacesClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class GeoPlacesClient: ClientRuntime.Client { public static let clientName = "GeoPlacesClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: GeoPlacesClient.GeoPlacesClientConfiguration let serviceName = "Geo Places" @@ -85,52 +85,54 @@ public class GeoPlacesClient: ClientRuntime.Client { } extension GeoPlacesClient { + public class GeoPlacesClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension GeoPlacesClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: GeoPlacesClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultGeoPlacesAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultGeoPlacesAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultGeoPlacesAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultGeoPlacesAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultGeoPlacesAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultGeoPlacesAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(GeoPlacesClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSGeoRoutes/Sources/AWSGeoRoutes/GeoRoutesClient.swift b/Sources/Services/AWSGeoRoutes/Sources/AWSGeoRoutes/GeoRoutesClient.swift index 1216350444d..87b39b2b483 100644 --- a/Sources/Services/AWSGeoRoutes/Sources/AWSGeoRoutes/GeoRoutesClient.swift +++ b/Sources/Services/AWSGeoRoutes/Sources/AWSGeoRoutes/GeoRoutesClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class GeoRoutesClient: ClientRuntime.Client { public static let clientName = "GeoRoutesClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: GeoRoutesClient.GeoRoutesClientConfiguration let serviceName = "Geo Routes" @@ -85,52 +85,54 @@ public class GeoRoutesClient: ClientRuntime.Client { } extension GeoRoutesClient { + public class GeoRoutesClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension GeoRoutesClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: GeoRoutesClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultGeoRoutesAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultGeoRoutesAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultGeoRoutesAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultGeoRoutesAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultGeoRoutesAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultGeoRoutesAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(GeoRoutesClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSGlacier/Sources/AWSGlacier/GlacierClient.swift b/Sources/Services/AWSGlacier/Sources/AWSGlacier/GlacierClient.swift index 73ecd384802..d3329ab99c8 100644 --- a/Sources/Services/AWSGlacier/Sources/AWSGlacier/GlacierClient.swift +++ b/Sources/Services/AWSGlacier/Sources/AWSGlacier/GlacierClient.swift @@ -70,7 +70,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class GlacierClient: ClientRuntime.Client { public static let clientName = "GlacierClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: GlacierClient.GlacierClientConfiguration let serviceName = "Glacier" @@ -92,52 +92,54 @@ public class GlacierClient: ClientRuntime.Client { } extension GlacierClient { + public class GlacierClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -162,25 +164,158 @@ extension GlacierClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: GlacierClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultGlacierAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultGlacierAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultGlacierAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultGlacierAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultGlacierAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultGlacierAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(GlacierClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSGlobalAccelerator/Sources/AWSGlobalAccelerator/GlobalAcceleratorClient.swift b/Sources/Services/AWSGlobalAccelerator/Sources/AWSGlobalAccelerator/GlobalAcceleratorClient.swift index efe18cb1040..a48169b85b1 100644 --- a/Sources/Services/AWSGlobalAccelerator/Sources/AWSGlobalAccelerator/GlobalAcceleratorClient.swift +++ b/Sources/Services/AWSGlobalAccelerator/Sources/AWSGlobalAccelerator/GlobalAcceleratorClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class GlobalAcceleratorClient: ClientRuntime.Client { public static let clientName = "GlobalAcceleratorClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: GlobalAcceleratorClient.GlobalAcceleratorClientConfiguration let serviceName = "Global Accelerator" @@ -86,52 +86,54 @@ public class GlobalAcceleratorClient: ClientRuntime.Client { } extension GlobalAcceleratorClient { + public class GlobalAcceleratorClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension GlobalAcceleratorClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: GlobalAcceleratorClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultGlobalAcceleratorAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultGlobalAcceleratorAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultGlobalAcceleratorAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultGlobalAcceleratorAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultGlobalAcceleratorAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultGlobalAcceleratorAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(GlobalAcceleratorClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSGlue/Sources/AWSGlue/GlueClient.swift b/Sources/Services/AWSGlue/Sources/AWSGlue/GlueClient.swift index 042fb1927c5..50b7d870bd6 100644 --- a/Sources/Services/AWSGlue/Sources/AWSGlue/GlueClient.swift +++ b/Sources/Services/AWSGlue/Sources/AWSGlue/GlueClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class GlueClient: ClientRuntime.Client { public static let clientName = "GlueClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: GlueClient.GlueClientConfiguration let serviceName = "Glue" @@ -87,52 +87,54 @@ public class GlueClient: ClientRuntime.Client { } extension GlueClient { + public class GlueClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension GlueClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: GlueClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultGlueAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultGlueAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultGlueAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultGlueAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultGlueAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultGlueAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(GlueClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSGrafana/Sources/AWSGrafana/GrafanaClient.swift b/Sources/Services/AWSGrafana/Sources/AWSGrafana/GrafanaClient.swift index e174fa98ade..fc9d2d0b4f6 100644 --- a/Sources/Services/AWSGrafana/Sources/AWSGrafana/GrafanaClient.swift +++ b/Sources/Services/AWSGrafana/Sources/AWSGrafana/GrafanaClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class GrafanaClient: ClientRuntime.Client { public static let clientName = "GrafanaClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: GrafanaClient.GrafanaClientConfiguration let serviceName = "grafana" @@ -87,52 +87,54 @@ public class GrafanaClient: ClientRuntime.Client { } extension GrafanaClient { + public class GrafanaClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension GrafanaClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: GrafanaClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultGrafanaAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultGrafanaAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultGrafanaAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultGrafanaAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultGrafanaAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultGrafanaAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(GrafanaClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSGreengrass/Sources/AWSGreengrass/GreengrassClient.swift b/Sources/Services/AWSGreengrass/Sources/AWSGreengrass/GreengrassClient.swift index 01985f11c63..d4570b3bc1a 100644 --- a/Sources/Services/AWSGreengrass/Sources/AWSGreengrass/GreengrassClient.swift +++ b/Sources/Services/AWSGreengrass/Sources/AWSGreengrass/GreengrassClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class GreengrassClient: ClientRuntime.Client { public static let clientName = "GreengrassClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: GreengrassClient.GreengrassClientConfiguration let serviceName = "Greengrass" @@ -86,52 +86,54 @@ public class GreengrassClient: ClientRuntime.Client { } extension GreengrassClient { + public class GreengrassClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension GreengrassClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: GreengrassClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultGreengrassAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultGreengrassAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultGreengrassAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultGreengrassAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultGreengrassAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultGreengrassAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(GreengrassClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSGreengrassV2/Sources/AWSGreengrassV2/GreengrassV2Client.swift b/Sources/Services/AWSGreengrassV2/Sources/AWSGreengrassV2/GreengrassV2Client.swift index 3667795ec73..d3dba59eebf 100644 --- a/Sources/Services/AWSGreengrassV2/Sources/AWSGreengrassV2/GreengrassV2Client.swift +++ b/Sources/Services/AWSGreengrassV2/Sources/AWSGreengrassV2/GreengrassV2Client.swift @@ -66,7 +66,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class GreengrassV2Client: ClientRuntime.Client { public static let clientName = "GreengrassV2Client" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: GreengrassV2Client.GreengrassV2ClientConfiguration let serviceName = "GreengrassV2" @@ -88,52 +88,54 @@ public class GreengrassV2Client: ClientRuntime.Client { } extension GreengrassV2Client { + public class GreengrassV2ClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -158,25 +160,158 @@ extension GreengrassV2Client { self.logger = telemetryProvider.loggerProvider.getLogger(name: GreengrassV2Client.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultGreengrassV2AuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultGreengrassV2AuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultGreengrassV2AuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultGreengrassV2AuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultGreengrassV2AuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultGreengrassV2AuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(GreengrassV2Client.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSGroundStation/Sources/AWSGroundStation/GroundStationClient.swift b/Sources/Services/AWSGroundStation/Sources/AWSGroundStation/GroundStationClient.swift index 05b9e02e09c..d4f5048a9e2 100644 --- a/Sources/Services/AWSGroundStation/Sources/AWSGroundStation/GroundStationClient.swift +++ b/Sources/Services/AWSGroundStation/Sources/AWSGroundStation/GroundStationClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class GroundStationClient: ClientRuntime.Client { public static let clientName = "GroundStationClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: GroundStationClient.GroundStationClientConfiguration let serviceName = "GroundStation" @@ -86,52 +86,54 @@ public class GroundStationClient: ClientRuntime.Client { } extension GroundStationClient { + public class GroundStationClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension GroundStationClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: GroundStationClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultGroundStationAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultGroundStationAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultGroundStationAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultGroundStationAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultGroundStationAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultGroundStationAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(GroundStationClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSGuardDuty/Sources/AWSGuardDuty/GuardDutyClient.swift b/Sources/Services/AWSGuardDuty/Sources/AWSGuardDuty/GuardDutyClient.swift index dcd95f8c824..62380d6b8eb 100644 --- a/Sources/Services/AWSGuardDuty/Sources/AWSGuardDuty/GuardDutyClient.swift +++ b/Sources/Services/AWSGuardDuty/Sources/AWSGuardDuty/GuardDutyClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class GuardDutyClient: ClientRuntime.Client { public static let clientName = "GuardDutyClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: GuardDutyClient.GuardDutyClientConfiguration let serviceName = "GuardDuty" @@ -87,52 +87,54 @@ public class GuardDutyClient: ClientRuntime.Client { } extension GuardDutyClient { + public class GuardDutyClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension GuardDutyClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: GuardDutyClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultGuardDutyAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultGuardDutyAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultGuardDutyAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultGuardDutyAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultGuardDutyAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultGuardDutyAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(GuardDutyClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSHealth/Sources/AWSHealth/HealthClient.swift b/Sources/Services/AWSHealth/Sources/AWSHealth/HealthClient.swift index bc6fe26cf9d..0fc49db8539 100644 --- a/Sources/Services/AWSHealth/Sources/AWSHealth/HealthClient.swift +++ b/Sources/Services/AWSHealth/Sources/AWSHealth/HealthClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class HealthClient: ClientRuntime.Client { public static let clientName = "HealthClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: HealthClient.HealthClientConfiguration let serviceName = "Health" @@ -85,52 +85,54 @@ public class HealthClient: ClientRuntime.Client { } extension HealthClient { + public class HealthClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension HealthClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: HealthClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultHealthAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultHealthAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultHealthAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultHealthAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultHealthAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultHealthAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(HealthClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSHealthLake/Sources/AWSHealthLake/HealthLakeClient.swift b/Sources/Services/AWSHealthLake/Sources/AWSHealthLake/HealthLakeClient.swift index 3b6a61560eb..c12a0da1d28 100644 --- a/Sources/Services/AWSHealthLake/Sources/AWSHealthLake/HealthLakeClient.swift +++ b/Sources/Services/AWSHealthLake/Sources/AWSHealthLake/HealthLakeClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class HealthLakeClient: ClientRuntime.Client { public static let clientName = "HealthLakeClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: HealthLakeClient.HealthLakeClientConfiguration let serviceName = "HealthLake" @@ -87,52 +87,54 @@ public class HealthLakeClient: ClientRuntime.Client { } extension HealthLakeClient { + public class HealthLakeClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension HealthLakeClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: HealthLakeClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultHealthLakeAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultHealthLakeAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultHealthLakeAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultHealthLakeAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultHealthLakeAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultHealthLakeAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(HealthLakeClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSIAM/Sources/AWSIAM/IAMClient.swift b/Sources/Services/AWSIAM/Sources/AWSIAM/IAMClient.swift index c3224bdc786..451495b730f 100644 --- a/Sources/Services/AWSIAM/Sources/AWSIAM/IAMClient.swift +++ b/Sources/Services/AWSIAM/Sources/AWSIAM/IAMClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class IAMClient: ClientRuntime.Client { public static let clientName = "IAMClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: IAMClient.IAMClientConfiguration let serviceName = "IAM" @@ -85,52 +85,54 @@ public class IAMClient: ClientRuntime.Client { } extension IAMClient { + public class IAMClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension IAMClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: IAMClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultIAMAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultIAMAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultIAMAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultIAMAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultIAMAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultIAMAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(IAMClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSIVSRealTime/Sources/AWSIVSRealTime/IVSRealTimeClient.swift b/Sources/Services/AWSIVSRealTime/Sources/AWSIVSRealTime/IVSRealTimeClient.swift index 6696d0d282c..ec711d5ed8a 100644 --- a/Sources/Services/AWSIVSRealTime/Sources/AWSIVSRealTime/IVSRealTimeClient.swift +++ b/Sources/Services/AWSIVSRealTime/Sources/AWSIVSRealTime/IVSRealTimeClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class IVSRealTimeClient: ClientRuntime.Client { public static let clientName = "IVSRealTimeClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: IVSRealTimeClient.IVSRealTimeClientConfiguration let serviceName = "IVS RealTime" @@ -86,52 +86,54 @@ public class IVSRealTimeClient: ClientRuntime.Client { } extension IVSRealTimeClient { + public class IVSRealTimeClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension IVSRealTimeClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: IVSRealTimeClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultIVSRealTimeAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultIVSRealTimeAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultIVSRealTimeAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultIVSRealTimeAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultIVSRealTimeAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultIVSRealTimeAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(IVSRealTimeClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSIdentitystore/Sources/AWSIdentitystore/IdentitystoreClient.swift b/Sources/Services/AWSIdentitystore/Sources/AWSIdentitystore/IdentitystoreClient.swift index 994debe899d..9c38db429d7 100644 --- a/Sources/Services/AWSIdentitystore/Sources/AWSIdentitystore/IdentitystoreClient.swift +++ b/Sources/Services/AWSIdentitystore/Sources/AWSIdentitystore/IdentitystoreClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class IdentitystoreClient: ClientRuntime.Client { public static let clientName = "IdentitystoreClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: IdentitystoreClient.IdentitystoreClientConfiguration let serviceName = "identitystore" @@ -85,52 +85,54 @@ public class IdentitystoreClient: ClientRuntime.Client { } extension IdentitystoreClient { + public class IdentitystoreClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension IdentitystoreClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: IdentitystoreClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultIdentitystoreAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultIdentitystoreAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultIdentitystoreAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultIdentitystoreAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultIdentitystoreAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultIdentitystoreAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(IdentitystoreClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSImagebuilder/Sources/AWSImagebuilder/ImagebuilderClient.swift b/Sources/Services/AWSImagebuilder/Sources/AWSImagebuilder/ImagebuilderClient.swift index c99040a0083..ae4cbfb91d2 100644 --- a/Sources/Services/AWSImagebuilder/Sources/AWSImagebuilder/ImagebuilderClient.swift +++ b/Sources/Services/AWSImagebuilder/Sources/AWSImagebuilder/ImagebuilderClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ImagebuilderClient: ClientRuntime.Client { public static let clientName = "ImagebuilderClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ImagebuilderClient.ImagebuilderClientConfiguration let serviceName = "imagebuilder" @@ -87,52 +87,54 @@ public class ImagebuilderClient: ClientRuntime.Client { } extension ImagebuilderClient { + public class ImagebuilderClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension ImagebuilderClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: ImagebuilderClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultImagebuilderAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultImagebuilderAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultImagebuilderAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultImagebuilderAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultImagebuilderAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultImagebuilderAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ImagebuilderClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSInspector/Sources/AWSInspector/InspectorClient.swift b/Sources/Services/AWSInspector/Sources/AWSInspector/InspectorClient.swift index 1db3667bdf1..04c57b47983 100644 --- a/Sources/Services/AWSInspector/Sources/AWSInspector/InspectorClient.swift +++ b/Sources/Services/AWSInspector/Sources/AWSInspector/InspectorClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class InspectorClient: ClientRuntime.Client { public static let clientName = "InspectorClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: InspectorClient.InspectorClientConfiguration let serviceName = "Inspector" @@ -86,52 +86,54 @@ public class InspectorClient: ClientRuntime.Client { } extension InspectorClient { + public class InspectorClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension InspectorClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: InspectorClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultInspectorAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultInspectorAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultInspectorAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultInspectorAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultInspectorAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultInspectorAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(InspectorClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSInspector2/Sources/AWSInspector2/Inspector2Client.swift b/Sources/Services/AWSInspector2/Sources/AWSInspector2/Inspector2Client.swift index 89fa712970d..6dfb60f3ae1 100644 --- a/Sources/Services/AWSInspector2/Sources/AWSInspector2/Inspector2Client.swift +++ b/Sources/Services/AWSInspector2/Sources/AWSInspector2/Inspector2Client.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class Inspector2Client: ClientRuntime.Client { public static let clientName = "Inspector2Client" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: Inspector2Client.Inspector2ClientConfiguration let serviceName = "Inspector2" @@ -86,52 +86,54 @@ public class Inspector2Client: ClientRuntime.Client { } extension Inspector2Client { + public class Inspector2ClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension Inspector2Client { self.logger = telemetryProvider.loggerProvider.getLogger(name: Inspector2Client.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultInspector2AuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultInspector2AuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultInspector2AuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultInspector2AuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultInspector2AuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultInspector2AuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(Inspector2Client.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSInspectorScan/Sources/AWSInspectorScan/InspectorScanClient.swift b/Sources/Services/AWSInspectorScan/Sources/AWSInspectorScan/InspectorScanClient.swift index b07f25d1245..6639c377232 100644 --- a/Sources/Services/AWSInspectorScan/Sources/AWSInspectorScan/InspectorScanClient.swift +++ b/Sources/Services/AWSInspectorScan/Sources/AWSInspectorScan/InspectorScanClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class InspectorScanClient: ClientRuntime.Client { public static let clientName = "InspectorScanClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: InspectorScanClient.InspectorScanClientConfiguration let serviceName = "Inspector Scan" @@ -85,52 +85,54 @@ public class InspectorScanClient: ClientRuntime.Client { } extension InspectorScanClient { + public class InspectorScanClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension InspectorScanClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: InspectorScanClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultInspectorScanAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultInspectorScanAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultInspectorScanAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultInspectorScanAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultInspectorScanAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultInspectorScanAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(InspectorScanClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSInternetMonitor/Sources/AWSInternetMonitor/InternetMonitorClient.swift b/Sources/Services/AWSInternetMonitor/Sources/AWSInternetMonitor/InternetMonitorClient.swift index 7e49f2d1b72..90ada13e887 100644 --- a/Sources/Services/AWSInternetMonitor/Sources/AWSInternetMonitor/InternetMonitorClient.swift +++ b/Sources/Services/AWSInternetMonitor/Sources/AWSInternetMonitor/InternetMonitorClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class InternetMonitorClient: ClientRuntime.Client { public static let clientName = "InternetMonitorClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: InternetMonitorClient.InternetMonitorClientConfiguration let serviceName = "InternetMonitor" @@ -87,52 +87,54 @@ public class InternetMonitorClient: ClientRuntime.Client { } extension InternetMonitorClient { + public class InternetMonitorClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension InternetMonitorClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: InternetMonitorClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultInternetMonitorAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultInternetMonitorAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultInternetMonitorAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultInternetMonitorAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultInternetMonitorAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultInternetMonitorAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(InternetMonitorClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSInvoicing/Sources/AWSInvoicing/InvoicingClient.swift b/Sources/Services/AWSInvoicing/Sources/AWSInvoicing/InvoicingClient.swift index db1af431f91..1c1563102d3 100644 --- a/Sources/Services/AWSInvoicing/Sources/AWSInvoicing/InvoicingClient.swift +++ b/Sources/Services/AWSInvoicing/Sources/AWSInvoicing/InvoicingClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class InvoicingClient: ClientRuntime.Client { public static let clientName = "InvoicingClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: InvoicingClient.InvoicingClientConfiguration let serviceName = "Invoicing" @@ -86,52 +86,54 @@ public class InvoicingClient: ClientRuntime.Client { } extension InvoicingClient { + public class InvoicingClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension InvoicingClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: InvoicingClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultInvoicingAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultInvoicingAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultInvoicingAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultInvoicingAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultInvoicingAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultInvoicingAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(InvoicingClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSIoT/Sources/AWSIoT/IoTClient.swift b/Sources/Services/AWSIoT/Sources/AWSIoT/IoTClient.swift index 3d818ef79d9..4cabe59a85a 100644 --- a/Sources/Services/AWSIoT/Sources/AWSIoT/IoTClient.swift +++ b/Sources/Services/AWSIoT/Sources/AWSIoT/IoTClient.swift @@ -67,7 +67,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class IoTClient: ClientRuntime.Client { public static let clientName = "IoTClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: IoTClient.IoTClientConfiguration let serviceName = "IoT" @@ -89,52 +89,54 @@ public class IoTClient: ClientRuntime.Client { } extension IoTClient { + public class IoTClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -159,25 +161,158 @@ extension IoTClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: IoTClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultIoTAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultIoTAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultIoTAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultIoTAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultIoTAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultIoTAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(IoTClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSIoT1ClickDevicesService/Sources/AWSIoT1ClickDevicesService/IoT1ClickDevicesClient.swift b/Sources/Services/AWSIoT1ClickDevicesService/Sources/AWSIoT1ClickDevicesService/IoT1ClickDevicesClient.swift index 04b99abde93..fbb4ac7c513 100644 --- a/Sources/Services/AWSIoT1ClickDevicesService/Sources/AWSIoT1ClickDevicesService/IoT1ClickDevicesClient.swift +++ b/Sources/Services/AWSIoT1ClickDevicesService/Sources/AWSIoT1ClickDevicesService/IoT1ClickDevicesClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class IoT1ClickDevicesClient: ClientRuntime.Client { public static let clientName = "IoT1ClickDevicesClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: IoT1ClickDevicesClient.IoT1ClickDevicesClientConfiguration let serviceName = "IoT 1Click Devices" @@ -86,52 +86,54 @@ public class IoT1ClickDevicesClient: ClientRuntime.Client { } extension IoT1ClickDevicesClient { + public class IoT1ClickDevicesClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension IoT1ClickDevicesClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: IoT1ClickDevicesClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultIoT1ClickDevicesServiceAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultIoT1ClickDevicesServiceAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultIoT1ClickDevicesServiceAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultIoT1ClickDevicesServiceAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultIoT1ClickDevicesServiceAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultIoT1ClickDevicesServiceAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(IoT1ClickDevicesClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSIoT1ClickProjects/Sources/AWSIoT1ClickProjects/IoT1ClickProjectsClient.swift b/Sources/Services/AWSIoT1ClickProjects/Sources/AWSIoT1ClickProjects/IoT1ClickProjectsClient.swift index 6f4cf7d54c8..87ed666ecff 100644 --- a/Sources/Services/AWSIoT1ClickProjects/Sources/AWSIoT1ClickProjects/IoT1ClickProjectsClient.swift +++ b/Sources/Services/AWSIoT1ClickProjects/Sources/AWSIoT1ClickProjects/IoT1ClickProjectsClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class IoT1ClickProjectsClient: ClientRuntime.Client { public static let clientName = "IoT1ClickProjectsClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: IoT1ClickProjectsClient.IoT1ClickProjectsClientConfiguration let serviceName = "IoT 1Click Projects" @@ -85,52 +85,54 @@ public class IoT1ClickProjectsClient: ClientRuntime.Client { } extension IoT1ClickProjectsClient { + public class IoT1ClickProjectsClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension IoT1ClickProjectsClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: IoT1ClickProjectsClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultIoT1ClickProjectsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultIoT1ClickProjectsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultIoT1ClickProjectsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultIoT1ClickProjectsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultIoT1ClickProjectsAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultIoT1ClickProjectsAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(IoT1ClickProjectsClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSIoTAnalytics/Sources/AWSIoTAnalytics/IoTAnalyticsClient.swift b/Sources/Services/AWSIoTAnalytics/Sources/AWSIoTAnalytics/IoTAnalyticsClient.swift index 3be03104fa6..4c844f578e0 100644 --- a/Sources/Services/AWSIoTAnalytics/Sources/AWSIoTAnalytics/IoTAnalyticsClient.swift +++ b/Sources/Services/AWSIoTAnalytics/Sources/AWSIoTAnalytics/IoTAnalyticsClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class IoTAnalyticsClient: ClientRuntime.Client { public static let clientName = "IoTAnalyticsClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: IoTAnalyticsClient.IoTAnalyticsClientConfiguration let serviceName = "IoTAnalytics" @@ -86,52 +86,54 @@ public class IoTAnalyticsClient: ClientRuntime.Client { } extension IoTAnalyticsClient { + public class IoTAnalyticsClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension IoTAnalyticsClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: IoTAnalyticsClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultIoTAnalyticsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultIoTAnalyticsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultIoTAnalyticsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultIoTAnalyticsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultIoTAnalyticsAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultIoTAnalyticsAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(IoTAnalyticsClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSIoTDataPlane/Sources/AWSIoTDataPlane/IoTDataPlaneClient.swift b/Sources/Services/AWSIoTDataPlane/Sources/AWSIoTDataPlane/IoTDataPlaneClient.swift index 2adfabf18e6..58b628ff641 100644 --- a/Sources/Services/AWSIoTDataPlane/Sources/AWSIoTDataPlane/IoTDataPlaneClient.swift +++ b/Sources/Services/AWSIoTDataPlane/Sources/AWSIoTDataPlane/IoTDataPlaneClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class IoTDataPlaneClient: ClientRuntime.Client { public static let clientName = "IoTDataPlaneClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: IoTDataPlaneClient.IoTDataPlaneClientConfiguration let serviceName = "IoT Data Plane" @@ -86,52 +86,54 @@ public class IoTDataPlaneClient: ClientRuntime.Client { } extension IoTDataPlaneClient { + public class IoTDataPlaneClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension IoTDataPlaneClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: IoTDataPlaneClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultIoTDataPlaneAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultIoTDataPlaneAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultIoTDataPlaneAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultIoTDataPlaneAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultIoTDataPlaneAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultIoTDataPlaneAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(IoTDataPlaneClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSIoTEvents/Sources/AWSIoTEvents/IoTEventsClient.swift b/Sources/Services/AWSIoTEvents/Sources/AWSIoTEvents/IoTEventsClient.swift index b7f2720d115..36e0b895ccf 100644 --- a/Sources/Services/AWSIoTEvents/Sources/AWSIoTEvents/IoTEventsClient.swift +++ b/Sources/Services/AWSIoTEvents/Sources/AWSIoTEvents/IoTEventsClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class IoTEventsClient: ClientRuntime.Client { public static let clientName = "IoTEventsClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: IoTEventsClient.IoTEventsClientConfiguration let serviceName = "IoT Events" @@ -86,52 +86,54 @@ public class IoTEventsClient: ClientRuntime.Client { } extension IoTEventsClient { + public class IoTEventsClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension IoTEventsClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: IoTEventsClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultIoTEventsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultIoTEventsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultIoTEventsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultIoTEventsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultIoTEventsAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultIoTEventsAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(IoTEventsClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSIoTEventsData/Sources/AWSIoTEventsData/IoTEventsDataClient.swift b/Sources/Services/AWSIoTEventsData/Sources/AWSIoTEventsData/IoTEventsDataClient.swift index 6d1bf8723d8..f50dd74905d 100644 --- a/Sources/Services/AWSIoTEventsData/Sources/AWSIoTEventsData/IoTEventsDataClient.swift +++ b/Sources/Services/AWSIoTEventsData/Sources/AWSIoTEventsData/IoTEventsDataClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class IoTEventsDataClient: ClientRuntime.Client { public static let clientName = "IoTEventsDataClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: IoTEventsDataClient.IoTEventsDataClientConfiguration let serviceName = "IoT Events Data" @@ -85,52 +85,54 @@ public class IoTEventsDataClient: ClientRuntime.Client { } extension IoTEventsDataClient { + public class IoTEventsDataClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension IoTEventsDataClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: IoTEventsDataClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultIoTEventsDataAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultIoTEventsDataAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultIoTEventsDataAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultIoTEventsDataAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultIoTEventsDataAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultIoTEventsDataAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(IoTEventsDataClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSIoTFleetHub/Sources/AWSIoTFleetHub/IoTFleetHubClient.swift b/Sources/Services/AWSIoTFleetHub/Sources/AWSIoTFleetHub/IoTFleetHubClient.swift index 7131a56d344..aa1f0a33574 100644 --- a/Sources/Services/AWSIoTFleetHub/Sources/AWSIoTFleetHub/IoTFleetHubClient.swift +++ b/Sources/Services/AWSIoTFleetHub/Sources/AWSIoTFleetHub/IoTFleetHubClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class IoTFleetHubClient: ClientRuntime.Client { public static let clientName = "IoTFleetHubClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: IoTFleetHubClient.IoTFleetHubClientConfiguration let serviceName = "IoTFleetHub" @@ -86,52 +86,54 @@ public class IoTFleetHubClient: ClientRuntime.Client { } extension IoTFleetHubClient { + public class IoTFleetHubClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension IoTFleetHubClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: IoTFleetHubClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultIoTFleetHubAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultIoTFleetHubAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultIoTFleetHubAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultIoTFleetHubAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultIoTFleetHubAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultIoTFleetHubAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(IoTFleetHubClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSIoTFleetWise/Sources/AWSIoTFleetWise/IoTFleetWiseClient.swift b/Sources/Services/AWSIoTFleetWise/Sources/AWSIoTFleetWise/IoTFleetWiseClient.swift index 0e0dfa29d5d..cef85cc0530 100644 --- a/Sources/Services/AWSIoTFleetWise/Sources/AWSIoTFleetWise/IoTFleetWiseClient.swift +++ b/Sources/Services/AWSIoTFleetWise/Sources/AWSIoTFleetWise/IoTFleetWiseClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class IoTFleetWiseClient: ClientRuntime.Client { public static let clientName = "IoTFleetWiseClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: IoTFleetWiseClient.IoTFleetWiseClientConfiguration let serviceName = "IoTFleetWise" @@ -87,52 +87,54 @@ public class IoTFleetWiseClient: ClientRuntime.Client { } extension IoTFleetWiseClient { + public class IoTFleetWiseClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension IoTFleetWiseClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: IoTFleetWiseClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultIoTFleetWiseAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultIoTFleetWiseAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultIoTFleetWiseAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultIoTFleetWiseAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultIoTFleetWiseAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultIoTFleetWiseAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(IoTFleetWiseClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSIoTJobsDataPlane/Sources/AWSIoTJobsDataPlane/IoTJobsDataPlaneClient.swift b/Sources/Services/AWSIoTJobsDataPlane/Sources/AWSIoTJobsDataPlane/IoTJobsDataPlaneClient.swift index 5a2bd1f400f..4d986a8a792 100644 --- a/Sources/Services/AWSIoTJobsDataPlane/Sources/AWSIoTJobsDataPlane/IoTJobsDataPlaneClient.swift +++ b/Sources/Services/AWSIoTJobsDataPlane/Sources/AWSIoTJobsDataPlane/IoTJobsDataPlaneClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class IoTJobsDataPlaneClient: ClientRuntime.Client { public static let clientName = "IoTJobsDataPlaneClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: IoTJobsDataPlaneClient.IoTJobsDataPlaneClientConfiguration let serviceName = "IoT Jobs Data Plane" @@ -86,52 +86,54 @@ public class IoTJobsDataPlaneClient: ClientRuntime.Client { } extension IoTJobsDataPlaneClient { + public class IoTJobsDataPlaneClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension IoTJobsDataPlaneClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: IoTJobsDataPlaneClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultIoTJobsDataPlaneAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultIoTJobsDataPlaneAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultIoTJobsDataPlaneAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultIoTJobsDataPlaneAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultIoTJobsDataPlaneAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultIoTJobsDataPlaneAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(IoTJobsDataPlaneClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSIoTSecureTunneling/Sources/AWSIoTSecureTunneling/IoTSecureTunnelingClient.swift b/Sources/Services/AWSIoTSecureTunneling/Sources/AWSIoTSecureTunneling/IoTSecureTunnelingClient.swift index 8d1afe6966d..789b75563c5 100644 --- a/Sources/Services/AWSIoTSecureTunneling/Sources/AWSIoTSecureTunneling/IoTSecureTunnelingClient.swift +++ b/Sources/Services/AWSIoTSecureTunneling/Sources/AWSIoTSecureTunneling/IoTSecureTunnelingClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class IoTSecureTunnelingClient: ClientRuntime.Client { public static let clientName = "IoTSecureTunnelingClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: IoTSecureTunnelingClient.IoTSecureTunnelingClientConfiguration let serviceName = "IoTSecureTunneling" @@ -86,52 +86,54 @@ public class IoTSecureTunnelingClient: ClientRuntime.Client { } extension IoTSecureTunnelingClient { + public class IoTSecureTunnelingClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension IoTSecureTunnelingClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: IoTSecureTunnelingClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultIoTSecureTunnelingAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultIoTSecureTunnelingAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultIoTSecureTunnelingAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultIoTSecureTunnelingAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultIoTSecureTunnelingAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultIoTSecureTunnelingAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(IoTSecureTunnelingClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSIoTSiteWise/Sources/AWSIoTSiteWise/IoTSiteWiseClient.swift b/Sources/Services/AWSIoTSiteWise/Sources/AWSIoTSiteWise/IoTSiteWiseClient.swift index 102d05f2843..f9a43640431 100644 --- a/Sources/Services/AWSIoTSiteWise/Sources/AWSIoTSiteWise/IoTSiteWiseClient.swift +++ b/Sources/Services/AWSIoTSiteWise/Sources/AWSIoTSiteWise/IoTSiteWiseClient.swift @@ -66,7 +66,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class IoTSiteWiseClient: ClientRuntime.Client { public static let clientName = "IoTSiteWiseClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: IoTSiteWiseClient.IoTSiteWiseClientConfiguration let serviceName = "IoTSiteWise" @@ -88,52 +88,54 @@ public class IoTSiteWiseClient: ClientRuntime.Client { } extension IoTSiteWiseClient { + public class IoTSiteWiseClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -158,25 +160,158 @@ extension IoTSiteWiseClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: IoTSiteWiseClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultIoTSiteWiseAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultIoTSiteWiseAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultIoTSiteWiseAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultIoTSiteWiseAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultIoTSiteWiseAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultIoTSiteWiseAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(IoTSiteWiseClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSIoTThingsGraph/Sources/AWSIoTThingsGraph/IoTThingsGraphClient.swift b/Sources/Services/AWSIoTThingsGraph/Sources/AWSIoTThingsGraph/IoTThingsGraphClient.swift index a7d57520e34..121c598970d 100644 --- a/Sources/Services/AWSIoTThingsGraph/Sources/AWSIoTThingsGraph/IoTThingsGraphClient.swift +++ b/Sources/Services/AWSIoTThingsGraph/Sources/AWSIoTThingsGraph/IoTThingsGraphClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class IoTThingsGraphClient: ClientRuntime.Client { public static let clientName = "IoTThingsGraphClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: IoTThingsGraphClient.IoTThingsGraphClientConfiguration let serviceName = "IoTThingsGraph" @@ -86,52 +86,54 @@ public class IoTThingsGraphClient: ClientRuntime.Client { } extension IoTThingsGraphClient { + public class IoTThingsGraphClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension IoTThingsGraphClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: IoTThingsGraphClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultIoTThingsGraphAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultIoTThingsGraphAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultIoTThingsGraphAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultIoTThingsGraphAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultIoTThingsGraphAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultIoTThingsGraphAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(IoTThingsGraphClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSIoTTwinMaker/Sources/AWSIoTTwinMaker/IoTTwinMakerClient.swift b/Sources/Services/AWSIoTTwinMaker/Sources/AWSIoTTwinMaker/IoTTwinMakerClient.swift index 2eb4df42096..0319a720a8b 100644 --- a/Sources/Services/AWSIoTTwinMaker/Sources/AWSIoTTwinMaker/IoTTwinMakerClient.swift +++ b/Sources/Services/AWSIoTTwinMaker/Sources/AWSIoTTwinMaker/IoTTwinMakerClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class IoTTwinMakerClient: ClientRuntime.Client { public static let clientName = "IoTTwinMakerClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: IoTTwinMakerClient.IoTTwinMakerClientConfiguration let serviceName = "IoTTwinMaker" @@ -86,52 +86,54 @@ public class IoTTwinMakerClient: ClientRuntime.Client { } extension IoTTwinMakerClient { + public class IoTTwinMakerClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension IoTTwinMakerClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: IoTTwinMakerClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultIoTTwinMakerAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultIoTTwinMakerAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultIoTTwinMakerAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultIoTTwinMakerAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultIoTTwinMakerAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultIoTTwinMakerAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(IoTTwinMakerClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSIoTWireless/Sources/AWSIoTWireless/IoTWirelessClient.swift b/Sources/Services/AWSIoTWireless/Sources/AWSIoTWireless/IoTWirelessClient.swift index 79584751cb1..6cde2e2380f 100644 --- a/Sources/Services/AWSIoTWireless/Sources/AWSIoTWireless/IoTWirelessClient.swift +++ b/Sources/Services/AWSIoTWireless/Sources/AWSIoTWireless/IoTWirelessClient.swift @@ -67,7 +67,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class IoTWirelessClient: ClientRuntime.Client { public static let clientName = "IoTWirelessClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: IoTWirelessClient.IoTWirelessClientConfiguration let serviceName = "IoT Wireless" @@ -89,52 +89,54 @@ public class IoTWirelessClient: ClientRuntime.Client { } extension IoTWirelessClient { + public class IoTWirelessClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -159,25 +161,158 @@ extension IoTWirelessClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: IoTWirelessClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultIoTWirelessAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultIoTWirelessAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultIoTWirelessAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultIoTWirelessAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultIoTWirelessAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultIoTWirelessAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(IoTWirelessClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSIotDeviceAdvisor/Sources/AWSIotDeviceAdvisor/IotDeviceAdvisorClient.swift b/Sources/Services/AWSIotDeviceAdvisor/Sources/AWSIotDeviceAdvisor/IotDeviceAdvisorClient.swift index b6ca70670fe..2322e05724d 100644 --- a/Sources/Services/AWSIotDeviceAdvisor/Sources/AWSIotDeviceAdvisor/IotDeviceAdvisorClient.swift +++ b/Sources/Services/AWSIotDeviceAdvisor/Sources/AWSIotDeviceAdvisor/IotDeviceAdvisorClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class IotDeviceAdvisorClient: ClientRuntime.Client { public static let clientName = "IotDeviceAdvisorClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: IotDeviceAdvisorClient.IotDeviceAdvisorClientConfiguration let serviceName = "IotDeviceAdvisor" @@ -87,52 +87,54 @@ public class IotDeviceAdvisorClient: ClientRuntime.Client { } extension IotDeviceAdvisorClient { + public class IotDeviceAdvisorClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension IotDeviceAdvisorClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: IotDeviceAdvisorClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultIotDeviceAdvisorAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultIotDeviceAdvisorAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultIotDeviceAdvisorAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultIotDeviceAdvisorAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultIotDeviceAdvisorAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultIotDeviceAdvisorAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(IotDeviceAdvisorClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSIvs/Sources/AWSIvs/IvsClient.swift b/Sources/Services/AWSIvs/Sources/AWSIvs/IvsClient.swift index 5e13e5e22cd..1602d3a6584 100644 --- a/Sources/Services/AWSIvs/Sources/AWSIvs/IvsClient.swift +++ b/Sources/Services/AWSIvs/Sources/AWSIvs/IvsClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class IvsClient: ClientRuntime.Client { public static let clientName = "IvsClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: IvsClient.IvsClientConfiguration let serviceName = "ivs" @@ -85,52 +85,54 @@ public class IvsClient: ClientRuntime.Client { } extension IvsClient { + public class IvsClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension IvsClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: IvsClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultIvsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultIvsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultIvsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultIvsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultIvsAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultIvsAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(IvsClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSIvschat/Sources/AWSIvschat/IvschatClient.swift b/Sources/Services/AWSIvschat/Sources/AWSIvschat/IvschatClient.swift index 524a3b2eae7..e86e1ead921 100644 --- a/Sources/Services/AWSIvschat/Sources/AWSIvschat/IvschatClient.swift +++ b/Sources/Services/AWSIvschat/Sources/AWSIvschat/IvschatClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class IvschatClient: ClientRuntime.Client { public static let clientName = "IvschatClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: IvschatClient.IvschatClientConfiguration let serviceName = "ivschat" @@ -86,52 +86,54 @@ public class IvschatClient: ClientRuntime.Client { } extension IvschatClient { + public class IvschatClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension IvschatClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: IvschatClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultIvschatAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultIvschatAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultIvschatAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultIvschatAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultIvschatAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultIvschatAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(IvschatClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSKMS/Sources/AWSKMS/KMSClient.swift b/Sources/Services/AWSKMS/Sources/AWSKMS/KMSClient.swift index 5bf4eca9fb2..4c34b33b859 100644 --- a/Sources/Services/AWSKMS/Sources/AWSKMS/KMSClient.swift +++ b/Sources/Services/AWSKMS/Sources/AWSKMS/KMSClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class KMSClient: ClientRuntime.Client { public static let clientName = "KMSClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: KMSClient.KMSClientConfiguration let serviceName = "KMS" @@ -86,52 +86,54 @@ public class KMSClient: ClientRuntime.Client { } extension KMSClient { + public class KMSClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension KMSClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: KMSClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultKMSAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultKMSAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultKMSAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultKMSAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultKMSAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultKMSAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(KMSClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSKafka/Sources/AWSKafka/KafkaClient.swift b/Sources/Services/AWSKafka/Sources/AWSKafka/KafkaClient.swift index 0f11ce3ad98..b86f40b363e 100644 --- a/Sources/Services/AWSKafka/Sources/AWSKafka/KafkaClient.swift +++ b/Sources/Services/AWSKafka/Sources/AWSKafka/KafkaClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class KafkaClient: ClientRuntime.Client { public static let clientName = "KafkaClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: KafkaClient.KafkaClientConfiguration let serviceName = "Kafka" @@ -86,52 +86,54 @@ public class KafkaClient: ClientRuntime.Client { } extension KafkaClient { + public class KafkaClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension KafkaClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: KafkaClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultKafkaAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultKafkaAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultKafkaAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultKafkaAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultKafkaAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultKafkaAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(KafkaClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSKafkaConnect/Sources/AWSKafkaConnect/KafkaConnectClient.swift b/Sources/Services/AWSKafkaConnect/Sources/AWSKafkaConnect/KafkaConnectClient.swift index abfc50945aa..4ea3c77ad48 100644 --- a/Sources/Services/AWSKafkaConnect/Sources/AWSKafkaConnect/KafkaConnectClient.swift +++ b/Sources/Services/AWSKafkaConnect/Sources/AWSKafkaConnect/KafkaConnectClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class KafkaConnectClient: ClientRuntime.Client { public static let clientName = "KafkaConnectClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: KafkaConnectClient.KafkaConnectClientConfiguration let serviceName = "KafkaConnect" @@ -86,52 +86,54 @@ public class KafkaConnectClient: ClientRuntime.Client { } extension KafkaConnectClient { + public class KafkaConnectClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension KafkaConnectClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: KafkaConnectClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultKafkaConnectAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultKafkaConnectAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultKafkaConnectAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultKafkaConnectAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultKafkaConnectAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultKafkaConnectAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(KafkaConnectClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSKendra/Sources/AWSKendra/KendraClient.swift b/Sources/Services/AWSKendra/Sources/AWSKendra/KendraClient.swift index 850be59a373..95dc839e96e 100644 --- a/Sources/Services/AWSKendra/Sources/AWSKendra/KendraClient.swift +++ b/Sources/Services/AWSKendra/Sources/AWSKendra/KendraClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class KendraClient: ClientRuntime.Client { public static let clientName = "KendraClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: KendraClient.KendraClientConfiguration let serviceName = "kendra" @@ -87,52 +87,54 @@ public class KendraClient: ClientRuntime.Client { } extension KendraClient { + public class KendraClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension KendraClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: KendraClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultKendraAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultKendraAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultKendraAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultKendraAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultKendraAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultKendraAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(KendraClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSKendraRanking/Sources/AWSKendraRanking/KendraRankingClient.swift b/Sources/Services/AWSKendraRanking/Sources/AWSKendraRanking/KendraRankingClient.swift index ef2a729e2a4..2c331d6680c 100644 --- a/Sources/Services/AWSKendraRanking/Sources/AWSKendraRanking/KendraRankingClient.swift +++ b/Sources/Services/AWSKendraRanking/Sources/AWSKendraRanking/KendraRankingClient.swift @@ -66,7 +66,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class KendraRankingClient: ClientRuntime.Client { public static let clientName = "KendraRankingClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: KendraRankingClient.KendraRankingClientConfiguration let serviceName = "Kendra Ranking" @@ -88,52 +88,54 @@ public class KendraRankingClient: ClientRuntime.Client { } extension KendraRankingClient { + public class KendraRankingClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -158,25 +160,158 @@ extension KendraRankingClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: KendraRankingClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultKendraRankingAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultKendraRankingAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultKendraRankingAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultKendraRankingAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultKendraRankingAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultKendraRankingAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(KendraRankingClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSKeyspaces/Sources/AWSKeyspaces/KeyspacesClient.swift b/Sources/Services/AWSKeyspaces/Sources/AWSKeyspaces/KeyspacesClient.swift index e9998e76ac8..78305b7a02b 100644 --- a/Sources/Services/AWSKeyspaces/Sources/AWSKeyspaces/KeyspacesClient.swift +++ b/Sources/Services/AWSKeyspaces/Sources/AWSKeyspaces/KeyspacesClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class KeyspacesClient: ClientRuntime.Client { public static let clientName = "KeyspacesClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: KeyspacesClient.KeyspacesClientConfiguration let serviceName = "Keyspaces" @@ -86,52 +86,54 @@ public class KeyspacesClient: ClientRuntime.Client { } extension KeyspacesClient { + public class KeyspacesClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension KeyspacesClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: KeyspacesClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultKeyspacesAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultKeyspacesAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultKeyspacesAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultKeyspacesAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultKeyspacesAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultKeyspacesAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(KeyspacesClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSKinesis/Sources/AWSKinesis/KinesisClient.swift b/Sources/Services/AWSKinesis/Sources/AWSKinesis/KinesisClient.swift index fd8907b2d17..ebae8a84195 100644 --- a/Sources/Services/AWSKinesis/Sources/AWSKinesis/KinesisClient.swift +++ b/Sources/Services/AWSKinesis/Sources/AWSKinesis/KinesisClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class KinesisClient: ClientRuntime.Client { public static let clientName = "KinesisClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: KinesisClient.KinesisClientConfiguration let serviceName = "Kinesis" @@ -86,52 +86,54 @@ public class KinesisClient: ClientRuntime.Client { } extension KinesisClient { + public class KinesisClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension KinesisClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: KinesisClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultKinesisAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultKinesisAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultKinesisAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultKinesisAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultKinesisAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultKinesisAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(KinesisClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSKinesisAnalytics/Sources/AWSKinesisAnalytics/KinesisAnalyticsClient.swift b/Sources/Services/AWSKinesisAnalytics/Sources/AWSKinesisAnalytics/KinesisAnalyticsClient.swift index 11980692259..d74a79ba9b4 100644 --- a/Sources/Services/AWSKinesisAnalytics/Sources/AWSKinesisAnalytics/KinesisAnalyticsClient.swift +++ b/Sources/Services/AWSKinesisAnalytics/Sources/AWSKinesisAnalytics/KinesisAnalyticsClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class KinesisAnalyticsClient: ClientRuntime.Client { public static let clientName = "KinesisAnalyticsClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: KinesisAnalyticsClient.KinesisAnalyticsClientConfiguration let serviceName = "Kinesis Analytics" @@ -86,52 +86,54 @@ public class KinesisAnalyticsClient: ClientRuntime.Client { } extension KinesisAnalyticsClient { + public class KinesisAnalyticsClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension KinesisAnalyticsClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: KinesisAnalyticsClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultKinesisAnalyticsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultKinesisAnalyticsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultKinesisAnalyticsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultKinesisAnalyticsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultKinesisAnalyticsAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultKinesisAnalyticsAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(KinesisAnalyticsClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSKinesisAnalyticsV2/Sources/AWSKinesisAnalyticsV2/KinesisAnalyticsV2Client.swift b/Sources/Services/AWSKinesisAnalyticsV2/Sources/AWSKinesisAnalyticsV2/KinesisAnalyticsV2Client.swift index c1b9f7c9e71..45d63ef8ada 100644 --- a/Sources/Services/AWSKinesisAnalyticsV2/Sources/AWSKinesisAnalyticsV2/KinesisAnalyticsV2Client.swift +++ b/Sources/Services/AWSKinesisAnalyticsV2/Sources/AWSKinesisAnalyticsV2/KinesisAnalyticsV2Client.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class KinesisAnalyticsV2Client: ClientRuntime.Client { public static let clientName = "KinesisAnalyticsV2Client" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: KinesisAnalyticsV2Client.KinesisAnalyticsV2ClientConfiguration let serviceName = "Kinesis Analytics V2" @@ -86,52 +86,54 @@ public class KinesisAnalyticsV2Client: ClientRuntime.Client { } extension KinesisAnalyticsV2Client { + public class KinesisAnalyticsV2ClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension KinesisAnalyticsV2Client { self.logger = telemetryProvider.loggerProvider.getLogger(name: KinesisAnalyticsV2Client.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultKinesisAnalyticsV2AuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultKinesisAnalyticsV2AuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultKinesisAnalyticsV2AuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultKinesisAnalyticsV2AuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultKinesisAnalyticsV2AuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultKinesisAnalyticsV2AuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(KinesisAnalyticsV2Client.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSKinesisVideo/Sources/AWSKinesisVideo/KinesisVideoClient.swift b/Sources/Services/AWSKinesisVideo/Sources/AWSKinesisVideo/KinesisVideoClient.swift index 7d5cc4e6ae7..fc1370e4b57 100644 --- a/Sources/Services/AWSKinesisVideo/Sources/AWSKinesisVideo/KinesisVideoClient.swift +++ b/Sources/Services/AWSKinesisVideo/Sources/AWSKinesisVideo/KinesisVideoClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class KinesisVideoClient: ClientRuntime.Client { public static let clientName = "KinesisVideoClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: KinesisVideoClient.KinesisVideoClientConfiguration let serviceName = "Kinesis Video" @@ -85,52 +85,54 @@ public class KinesisVideoClient: ClientRuntime.Client { } extension KinesisVideoClient { + public class KinesisVideoClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension KinesisVideoClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: KinesisVideoClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultKinesisVideoAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultKinesisVideoAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultKinesisVideoAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultKinesisVideoAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultKinesisVideoAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultKinesisVideoAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(KinesisVideoClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSKinesisVideoArchivedMedia/Sources/AWSKinesisVideoArchivedMedia/KinesisVideoArchivedMediaClient.swift b/Sources/Services/AWSKinesisVideoArchivedMedia/Sources/AWSKinesisVideoArchivedMedia/KinesisVideoArchivedMediaClient.swift index de4d12929bd..268961a71bc 100644 --- a/Sources/Services/AWSKinesisVideoArchivedMedia/Sources/AWSKinesisVideoArchivedMedia/KinesisVideoArchivedMediaClient.swift +++ b/Sources/Services/AWSKinesisVideoArchivedMedia/Sources/AWSKinesisVideoArchivedMedia/KinesisVideoArchivedMediaClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class KinesisVideoArchivedMediaClient: ClientRuntime.Client { public static let clientName = "KinesisVideoArchivedMediaClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: KinesisVideoArchivedMediaClient.KinesisVideoArchivedMediaClientConfiguration let serviceName = "Kinesis Video Archived Media" @@ -86,52 +86,54 @@ public class KinesisVideoArchivedMediaClient: ClientRuntime.Client { } extension KinesisVideoArchivedMediaClient { + public class KinesisVideoArchivedMediaClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension KinesisVideoArchivedMediaClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: KinesisVideoArchivedMediaClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultKinesisVideoArchivedMediaAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultKinesisVideoArchivedMediaAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultKinesisVideoArchivedMediaAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultKinesisVideoArchivedMediaAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultKinesisVideoArchivedMediaAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultKinesisVideoArchivedMediaAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(KinesisVideoArchivedMediaClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSKinesisVideoMedia/Sources/AWSKinesisVideoMedia/KinesisVideoMediaClient.swift b/Sources/Services/AWSKinesisVideoMedia/Sources/AWSKinesisVideoMedia/KinesisVideoMediaClient.swift index 963d447f250..711ef9987ac 100644 --- a/Sources/Services/AWSKinesisVideoMedia/Sources/AWSKinesisVideoMedia/KinesisVideoMediaClient.swift +++ b/Sources/Services/AWSKinesisVideoMedia/Sources/AWSKinesisVideoMedia/KinesisVideoMediaClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class KinesisVideoMediaClient: ClientRuntime.Client { public static let clientName = "KinesisVideoMediaClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: KinesisVideoMediaClient.KinesisVideoMediaClientConfiguration let serviceName = "Kinesis Video Media" @@ -85,52 +85,54 @@ public class KinesisVideoMediaClient: ClientRuntime.Client { } extension KinesisVideoMediaClient { + public class KinesisVideoMediaClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension KinesisVideoMediaClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: KinesisVideoMediaClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultKinesisVideoMediaAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultKinesisVideoMediaAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultKinesisVideoMediaAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultKinesisVideoMediaAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultKinesisVideoMediaAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultKinesisVideoMediaAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(KinesisVideoMediaClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSKinesisVideoSignaling/Sources/AWSKinesisVideoSignaling/KinesisVideoSignalingClient.swift b/Sources/Services/AWSKinesisVideoSignaling/Sources/AWSKinesisVideoSignaling/KinesisVideoSignalingClient.swift index 02a498eb582..5c6a5aea5b9 100644 --- a/Sources/Services/AWSKinesisVideoSignaling/Sources/AWSKinesisVideoSignaling/KinesisVideoSignalingClient.swift +++ b/Sources/Services/AWSKinesisVideoSignaling/Sources/AWSKinesisVideoSignaling/KinesisVideoSignalingClient.swift @@ -62,7 +62,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class KinesisVideoSignalingClient: ClientRuntime.Client { public static let clientName = "KinesisVideoSignalingClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: KinesisVideoSignalingClient.KinesisVideoSignalingClientConfiguration let serviceName = "Kinesis Video Signaling" @@ -84,52 +84,54 @@ public class KinesisVideoSignalingClient: ClientRuntime.Client { } extension KinesisVideoSignalingClient { + public class KinesisVideoSignalingClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -154,25 +156,158 @@ extension KinesisVideoSignalingClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: KinesisVideoSignalingClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultKinesisVideoSignalingAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultKinesisVideoSignalingAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultKinesisVideoSignalingAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultKinesisVideoSignalingAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultKinesisVideoSignalingAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultKinesisVideoSignalingAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(KinesisVideoSignalingClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSKinesisVideoWebRTCStorage/Sources/AWSKinesisVideoWebRTCStorage/KinesisVideoWebRTCStorageClient.swift b/Sources/Services/AWSKinesisVideoWebRTCStorage/Sources/AWSKinesisVideoWebRTCStorage/KinesisVideoWebRTCStorageClient.swift index 05681403f5b..717eaad2249 100644 --- a/Sources/Services/AWSKinesisVideoWebRTCStorage/Sources/AWSKinesisVideoWebRTCStorage/KinesisVideoWebRTCStorageClient.swift +++ b/Sources/Services/AWSKinesisVideoWebRTCStorage/Sources/AWSKinesisVideoWebRTCStorage/KinesisVideoWebRTCStorageClient.swift @@ -62,7 +62,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class KinesisVideoWebRTCStorageClient: ClientRuntime.Client { public static let clientName = "KinesisVideoWebRTCStorageClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: KinesisVideoWebRTCStorageClient.KinesisVideoWebRTCStorageClientConfiguration let serviceName = "Kinesis Video WebRTC Storage" @@ -84,52 +84,54 @@ public class KinesisVideoWebRTCStorageClient: ClientRuntime.Client { } extension KinesisVideoWebRTCStorageClient { + public class KinesisVideoWebRTCStorageClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -154,25 +156,158 @@ extension KinesisVideoWebRTCStorageClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: KinesisVideoWebRTCStorageClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultKinesisVideoWebRTCStorageAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultKinesisVideoWebRTCStorageAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultKinesisVideoWebRTCStorageAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultKinesisVideoWebRTCStorageAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultKinesisVideoWebRTCStorageAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultKinesisVideoWebRTCStorageAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(KinesisVideoWebRTCStorageClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSLakeFormation/Sources/AWSLakeFormation/LakeFormationClient.swift b/Sources/Services/AWSLakeFormation/Sources/AWSLakeFormation/LakeFormationClient.swift index f566d8a140e..5cc18d7ace0 100644 --- a/Sources/Services/AWSLakeFormation/Sources/AWSLakeFormation/LakeFormationClient.swift +++ b/Sources/Services/AWSLakeFormation/Sources/AWSLakeFormation/LakeFormationClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class LakeFormationClient: ClientRuntime.Client { public static let clientName = "LakeFormationClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: LakeFormationClient.LakeFormationClientConfiguration let serviceName = "LakeFormation" @@ -86,52 +86,54 @@ public class LakeFormationClient: ClientRuntime.Client { } extension LakeFormationClient { + public class LakeFormationClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension LakeFormationClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: LakeFormationClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultLakeFormationAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultLakeFormationAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultLakeFormationAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultLakeFormationAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultLakeFormationAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultLakeFormationAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(LakeFormationClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSLambda/Sources/AWSLambda/LambdaClient.swift b/Sources/Services/AWSLambda/Sources/AWSLambda/LambdaClient.swift index b363177b3fa..23edb810fea 100644 --- a/Sources/Services/AWSLambda/Sources/AWSLambda/LambdaClient.swift +++ b/Sources/Services/AWSLambda/Sources/AWSLambda/LambdaClient.swift @@ -69,7 +69,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class LambdaClient: ClientRuntime.Client { public static let clientName = "LambdaClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: LambdaClient.LambdaClientConfiguration let serviceName = "Lambda" @@ -91,52 +91,54 @@ public class LambdaClient: ClientRuntime.Client { } extension LambdaClient { + public class LambdaClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -161,25 +163,158 @@ extension LambdaClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: LambdaClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultLambdaAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultLambdaAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultLambdaAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultLambdaAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultLambdaAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultLambdaAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(LambdaClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSLaunchWizard/Sources/AWSLaunchWizard/LaunchWizardClient.swift b/Sources/Services/AWSLaunchWizard/Sources/AWSLaunchWizard/LaunchWizardClient.swift index b9f07114a1e..e6007065a2b 100644 --- a/Sources/Services/AWSLaunchWizard/Sources/AWSLaunchWizard/LaunchWizardClient.swift +++ b/Sources/Services/AWSLaunchWizard/Sources/AWSLaunchWizard/LaunchWizardClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class LaunchWizardClient: ClientRuntime.Client { public static let clientName = "LaunchWizardClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: LaunchWizardClient.LaunchWizardClientConfiguration let serviceName = "Launch Wizard" @@ -85,52 +85,54 @@ public class LaunchWizardClient: ClientRuntime.Client { } extension LaunchWizardClient { + public class LaunchWizardClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension LaunchWizardClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: LaunchWizardClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultLaunchWizardAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultLaunchWizardAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultLaunchWizardAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultLaunchWizardAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultLaunchWizardAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultLaunchWizardAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(LaunchWizardClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSLexModelBuildingService/Sources/AWSLexModelBuildingService/LexModelBuildingClient.swift b/Sources/Services/AWSLexModelBuildingService/Sources/AWSLexModelBuildingService/LexModelBuildingClient.swift index 349724996c8..e41907bed37 100644 --- a/Sources/Services/AWSLexModelBuildingService/Sources/AWSLexModelBuildingService/LexModelBuildingClient.swift +++ b/Sources/Services/AWSLexModelBuildingService/Sources/AWSLexModelBuildingService/LexModelBuildingClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class LexModelBuildingClient: ClientRuntime.Client { public static let clientName = "LexModelBuildingClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: LexModelBuildingClient.LexModelBuildingClientConfiguration let serviceName = "Lex Model Building" @@ -86,52 +86,54 @@ public class LexModelBuildingClient: ClientRuntime.Client { } extension LexModelBuildingClient { + public class LexModelBuildingClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension LexModelBuildingClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: LexModelBuildingClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultLexModelBuildingServiceAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultLexModelBuildingServiceAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultLexModelBuildingServiceAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultLexModelBuildingServiceAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultLexModelBuildingServiceAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultLexModelBuildingServiceAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(LexModelBuildingClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSLexModelsV2/Sources/AWSLexModelsV2/LexModelsV2Client.swift b/Sources/Services/AWSLexModelsV2/Sources/AWSLexModelsV2/LexModelsV2Client.swift index ea86926e5e6..0fe6804694e 100644 --- a/Sources/Services/AWSLexModelsV2/Sources/AWSLexModelsV2/LexModelsV2Client.swift +++ b/Sources/Services/AWSLexModelsV2/Sources/AWSLexModelsV2/LexModelsV2Client.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class LexModelsV2Client: ClientRuntime.Client { public static let clientName = "LexModelsV2Client" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: LexModelsV2Client.LexModelsV2ClientConfiguration let serviceName = "Lex Models V2" @@ -86,52 +86,54 @@ public class LexModelsV2Client: ClientRuntime.Client { } extension LexModelsV2Client { + public class LexModelsV2ClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension LexModelsV2Client { self.logger = telemetryProvider.loggerProvider.getLogger(name: LexModelsV2Client.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultLexModelsV2AuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultLexModelsV2AuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultLexModelsV2AuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultLexModelsV2AuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultLexModelsV2AuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultLexModelsV2AuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(LexModelsV2Client.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSLexRuntimeService/Sources/AWSLexRuntimeService/LexRuntimeClient.swift b/Sources/Services/AWSLexRuntimeService/Sources/AWSLexRuntimeService/LexRuntimeClient.swift index c7e606fd13c..128645d6bc7 100644 --- a/Sources/Services/AWSLexRuntimeService/Sources/AWSLexRuntimeService/LexRuntimeClient.swift +++ b/Sources/Services/AWSLexRuntimeService/Sources/AWSLexRuntimeService/LexRuntimeClient.swift @@ -67,7 +67,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class LexRuntimeClient: ClientRuntime.Client { public static let clientName = "LexRuntimeClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: LexRuntimeClient.LexRuntimeClientConfiguration let serviceName = "Lex Runtime" @@ -89,52 +89,54 @@ public class LexRuntimeClient: ClientRuntime.Client { } extension LexRuntimeClient { + public class LexRuntimeClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -159,25 +161,158 @@ extension LexRuntimeClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: LexRuntimeClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultLexRuntimeServiceAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultLexRuntimeServiceAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultLexRuntimeServiceAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultLexRuntimeServiceAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultLexRuntimeServiceAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultLexRuntimeServiceAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(LexRuntimeClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSLexRuntimeV2/Sources/AWSLexRuntimeV2/LexRuntimeV2Client.swift b/Sources/Services/AWSLexRuntimeV2/Sources/AWSLexRuntimeV2/LexRuntimeV2Client.swift index 984971e8977..fafc33d2b4d 100644 --- a/Sources/Services/AWSLexRuntimeV2/Sources/AWSLexRuntimeV2/LexRuntimeV2Client.swift +++ b/Sources/Services/AWSLexRuntimeV2/Sources/AWSLexRuntimeV2/LexRuntimeV2Client.swift @@ -68,7 +68,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class LexRuntimeV2Client: ClientRuntime.Client { public static let clientName = "LexRuntimeV2Client" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: LexRuntimeV2Client.LexRuntimeV2ClientConfiguration let serviceName = "Lex Runtime V2" @@ -90,52 +90,54 @@ public class LexRuntimeV2Client: ClientRuntime.Client { } extension LexRuntimeV2Client { + public class LexRuntimeV2ClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -160,25 +162,158 @@ extension LexRuntimeV2Client { self.logger = telemetryProvider.loggerProvider.getLogger(name: LexRuntimeV2Client.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultLexRuntimeV2AuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultLexRuntimeV2AuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultLexRuntimeV2AuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultLexRuntimeV2AuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultLexRuntimeV2AuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultLexRuntimeV2AuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(LexRuntimeV2Client.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSLicenseManager/Sources/AWSLicenseManager/LicenseManagerClient.swift b/Sources/Services/AWSLicenseManager/Sources/AWSLicenseManager/LicenseManagerClient.swift index 88de373862c..de85e794649 100644 --- a/Sources/Services/AWSLicenseManager/Sources/AWSLicenseManager/LicenseManagerClient.swift +++ b/Sources/Services/AWSLicenseManager/Sources/AWSLicenseManager/LicenseManagerClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class LicenseManagerClient: ClientRuntime.Client { public static let clientName = "LicenseManagerClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: LicenseManagerClient.LicenseManagerClientConfiguration let serviceName = "License Manager" @@ -86,52 +86,54 @@ public class LicenseManagerClient: ClientRuntime.Client { } extension LicenseManagerClient { + public class LicenseManagerClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension LicenseManagerClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: LicenseManagerClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultLicenseManagerAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultLicenseManagerAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultLicenseManagerAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultLicenseManagerAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultLicenseManagerAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultLicenseManagerAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(LicenseManagerClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSLicenseManagerLinuxSubscriptions/Sources/AWSLicenseManagerLinuxSubscriptions/LicenseManagerLinuxSubscriptionsClient.swift b/Sources/Services/AWSLicenseManagerLinuxSubscriptions/Sources/AWSLicenseManagerLinuxSubscriptions/LicenseManagerLinuxSubscriptionsClient.swift index c9962b193bf..a21dc4b0901 100644 --- a/Sources/Services/AWSLicenseManagerLinuxSubscriptions/Sources/AWSLicenseManagerLinuxSubscriptions/LicenseManagerLinuxSubscriptionsClient.swift +++ b/Sources/Services/AWSLicenseManagerLinuxSubscriptions/Sources/AWSLicenseManagerLinuxSubscriptions/LicenseManagerLinuxSubscriptionsClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class LicenseManagerLinuxSubscriptionsClient: ClientRuntime.Client { public static let clientName = "LicenseManagerLinuxSubscriptionsClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: LicenseManagerLinuxSubscriptionsClient.LicenseManagerLinuxSubscriptionsClientConfiguration let serviceName = "License Manager Linux Subscriptions" @@ -85,52 +85,54 @@ public class LicenseManagerLinuxSubscriptionsClient: ClientRuntime.Client { } extension LicenseManagerLinuxSubscriptionsClient { + public class LicenseManagerLinuxSubscriptionsClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension LicenseManagerLinuxSubscriptionsClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: LicenseManagerLinuxSubscriptionsClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultLicenseManagerLinuxSubscriptionsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultLicenseManagerLinuxSubscriptionsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultLicenseManagerLinuxSubscriptionsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultLicenseManagerLinuxSubscriptionsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultLicenseManagerLinuxSubscriptionsAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultLicenseManagerLinuxSubscriptionsAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(LicenseManagerLinuxSubscriptionsClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSLicenseManagerUserSubscriptions/Sources/AWSLicenseManagerUserSubscriptions/LicenseManagerUserSubscriptionsClient.swift b/Sources/Services/AWSLicenseManagerUserSubscriptions/Sources/AWSLicenseManagerUserSubscriptions/LicenseManagerUserSubscriptionsClient.swift index 307f37b97d3..bf191711062 100644 --- a/Sources/Services/AWSLicenseManagerUserSubscriptions/Sources/AWSLicenseManagerUserSubscriptions/LicenseManagerUserSubscriptionsClient.swift +++ b/Sources/Services/AWSLicenseManagerUserSubscriptions/Sources/AWSLicenseManagerUserSubscriptions/LicenseManagerUserSubscriptionsClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class LicenseManagerUserSubscriptionsClient: ClientRuntime.Client { public static let clientName = "LicenseManagerUserSubscriptionsClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: LicenseManagerUserSubscriptionsClient.LicenseManagerUserSubscriptionsClientConfiguration let serviceName = "License Manager User Subscriptions" @@ -85,52 +85,54 @@ public class LicenseManagerUserSubscriptionsClient: ClientRuntime.Client { } extension LicenseManagerUserSubscriptionsClient { + public class LicenseManagerUserSubscriptionsClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension LicenseManagerUserSubscriptionsClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: LicenseManagerUserSubscriptionsClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultLicenseManagerUserSubscriptionsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultLicenseManagerUserSubscriptionsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultLicenseManagerUserSubscriptionsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultLicenseManagerUserSubscriptionsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultLicenseManagerUserSubscriptionsAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultLicenseManagerUserSubscriptionsAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(LicenseManagerUserSubscriptionsClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSLightsail/Sources/AWSLightsail/LightsailClient.swift b/Sources/Services/AWSLightsail/Sources/AWSLightsail/LightsailClient.swift index 6bd29a970d2..5cda55c7764 100644 --- a/Sources/Services/AWSLightsail/Sources/AWSLightsail/LightsailClient.swift +++ b/Sources/Services/AWSLightsail/Sources/AWSLightsail/LightsailClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class LightsailClient: ClientRuntime.Client { public static let clientName = "LightsailClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: LightsailClient.LightsailClientConfiguration let serviceName = "Lightsail" @@ -87,52 +87,54 @@ public class LightsailClient: ClientRuntime.Client { } extension LightsailClient { + public class LightsailClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension LightsailClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: LightsailClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultLightsailAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultLightsailAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultLightsailAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultLightsailAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultLightsailAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultLightsailAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(LightsailClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSLocation/Sources/AWSLocation/LocationClient.swift b/Sources/Services/AWSLocation/Sources/AWSLocation/LocationClient.swift index 8250aedc156..2b23c15468e 100644 --- a/Sources/Services/AWSLocation/Sources/AWSLocation/LocationClient.swift +++ b/Sources/Services/AWSLocation/Sources/AWSLocation/LocationClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class LocationClient: ClientRuntime.Client { public static let clientName = "LocationClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: LocationClient.LocationClientConfiguration let serviceName = "Location" @@ -86,52 +86,54 @@ public class LocationClient: ClientRuntime.Client { } extension LocationClient { + public class LocationClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension LocationClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: LocationClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultLocationAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultLocationAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultLocationAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultLocationAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultLocationAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultLocationAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(LocationClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSLookoutEquipment/Sources/AWSLookoutEquipment/LookoutEquipmentClient.swift b/Sources/Services/AWSLookoutEquipment/Sources/AWSLookoutEquipment/LookoutEquipmentClient.swift index c1b5407bfa4..2c3cedeffb3 100644 --- a/Sources/Services/AWSLookoutEquipment/Sources/AWSLookoutEquipment/LookoutEquipmentClient.swift +++ b/Sources/Services/AWSLookoutEquipment/Sources/AWSLookoutEquipment/LookoutEquipmentClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class LookoutEquipmentClient: ClientRuntime.Client { public static let clientName = "LookoutEquipmentClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: LookoutEquipmentClient.LookoutEquipmentClientConfiguration let serviceName = "LookoutEquipment" @@ -87,52 +87,54 @@ public class LookoutEquipmentClient: ClientRuntime.Client { } extension LookoutEquipmentClient { + public class LookoutEquipmentClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension LookoutEquipmentClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: LookoutEquipmentClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultLookoutEquipmentAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultLookoutEquipmentAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultLookoutEquipmentAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultLookoutEquipmentAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultLookoutEquipmentAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultLookoutEquipmentAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(LookoutEquipmentClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSLookoutMetrics/Sources/AWSLookoutMetrics/LookoutMetricsClient.swift b/Sources/Services/AWSLookoutMetrics/Sources/AWSLookoutMetrics/LookoutMetricsClient.swift index 8eef23cd9ce..b3e7c286b9a 100644 --- a/Sources/Services/AWSLookoutMetrics/Sources/AWSLookoutMetrics/LookoutMetricsClient.swift +++ b/Sources/Services/AWSLookoutMetrics/Sources/AWSLookoutMetrics/LookoutMetricsClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class LookoutMetricsClient: ClientRuntime.Client { public static let clientName = "LookoutMetricsClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: LookoutMetricsClient.LookoutMetricsClientConfiguration let serviceName = "LookoutMetrics" @@ -86,52 +86,54 @@ public class LookoutMetricsClient: ClientRuntime.Client { } extension LookoutMetricsClient { + public class LookoutMetricsClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension LookoutMetricsClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: LookoutMetricsClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultLookoutMetricsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultLookoutMetricsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultLookoutMetricsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultLookoutMetricsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultLookoutMetricsAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultLookoutMetricsAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(LookoutMetricsClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSLookoutVision/Sources/AWSLookoutVision/LookoutVisionClient.swift b/Sources/Services/AWSLookoutVision/Sources/AWSLookoutVision/LookoutVisionClient.swift index 6baa506eceb..a58a885b14a 100644 --- a/Sources/Services/AWSLookoutVision/Sources/AWSLookoutVision/LookoutVisionClient.swift +++ b/Sources/Services/AWSLookoutVision/Sources/AWSLookoutVision/LookoutVisionClient.swift @@ -69,7 +69,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class LookoutVisionClient: ClientRuntime.Client { public static let clientName = "LookoutVisionClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: LookoutVisionClient.LookoutVisionClientConfiguration let serviceName = "LookoutVision" @@ -91,52 +91,54 @@ public class LookoutVisionClient: ClientRuntime.Client { } extension LookoutVisionClient { + public class LookoutVisionClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -161,25 +163,158 @@ extension LookoutVisionClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: LookoutVisionClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultLookoutVisionAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultLookoutVisionAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultLookoutVisionAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultLookoutVisionAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultLookoutVisionAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultLookoutVisionAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(LookoutVisionClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSM2/Sources/AWSM2/M2Client.swift b/Sources/Services/AWSM2/Sources/AWSM2/M2Client.swift index f5d6fe963b7..6aa9ee4c08c 100644 --- a/Sources/Services/AWSM2/Sources/AWSM2/M2Client.swift +++ b/Sources/Services/AWSM2/Sources/AWSM2/M2Client.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class M2Client: ClientRuntime.Client { public static let clientName = "M2Client" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: M2Client.M2ClientConfiguration let serviceName = "m2" @@ -87,52 +87,54 @@ public class M2Client: ClientRuntime.Client { } extension M2Client { + public class M2ClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension M2Client { self.logger = telemetryProvider.loggerProvider.getLogger(name: M2Client.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultM2AuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultM2AuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultM2AuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultM2AuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultM2AuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultM2AuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(M2Client.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSMTurk/Sources/AWSMTurk/MTurkClient.swift b/Sources/Services/AWSMTurk/Sources/AWSMTurk/MTurkClient.swift index 27f4d5c0919..8fe14a07357 100644 --- a/Sources/Services/AWSMTurk/Sources/AWSMTurk/MTurkClient.swift +++ b/Sources/Services/AWSMTurk/Sources/AWSMTurk/MTurkClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class MTurkClient: ClientRuntime.Client { public static let clientName = "MTurkClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: MTurkClient.MTurkClientConfiguration let serviceName = "MTurk" @@ -86,52 +86,54 @@ public class MTurkClient: ClientRuntime.Client { } extension MTurkClient { + public class MTurkClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension MTurkClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: MTurkClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMTurkAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMTurkAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMTurkAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMTurkAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultMTurkAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultMTurkAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(MTurkClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSMWAA/Sources/AWSMWAA/MWAAClient.swift b/Sources/Services/AWSMWAA/Sources/AWSMWAA/MWAAClient.swift index 015b293042e..e9d58217cf9 100644 --- a/Sources/Services/AWSMWAA/Sources/AWSMWAA/MWAAClient.swift +++ b/Sources/Services/AWSMWAA/Sources/AWSMWAA/MWAAClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class MWAAClient: ClientRuntime.Client { public static let clientName = "MWAAClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: MWAAClient.MWAAClientConfiguration let serviceName = "MWAA" @@ -86,52 +86,54 @@ public class MWAAClient: ClientRuntime.Client { } extension MWAAClient { + public class MWAAClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension MWAAClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: MWAAClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMWAAAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMWAAAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMWAAAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMWAAAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultMWAAAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultMWAAAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(MWAAClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSMachineLearning/Sources/AWSMachineLearning/MachineLearningClient.swift b/Sources/Services/AWSMachineLearning/Sources/AWSMachineLearning/MachineLearningClient.swift index b296efb4ecc..38dc220369e 100644 --- a/Sources/Services/AWSMachineLearning/Sources/AWSMachineLearning/MachineLearningClient.swift +++ b/Sources/Services/AWSMachineLearning/Sources/AWSMachineLearning/MachineLearningClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class MachineLearningClient: ClientRuntime.Client { public static let clientName = "MachineLearningClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: MachineLearningClient.MachineLearningClientConfiguration let serviceName = "Machine Learning" @@ -86,52 +86,54 @@ public class MachineLearningClient: ClientRuntime.Client { } extension MachineLearningClient { + public class MachineLearningClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension MachineLearningClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: MachineLearningClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMachineLearningAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMachineLearningAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMachineLearningAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMachineLearningAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultMachineLearningAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultMachineLearningAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(MachineLearningClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSMacie2/Sources/AWSMacie2/Macie2Client.swift b/Sources/Services/AWSMacie2/Sources/AWSMacie2/Macie2Client.swift index 5683266605e..c8d8c16c2c2 100644 --- a/Sources/Services/AWSMacie2/Sources/AWSMacie2/Macie2Client.swift +++ b/Sources/Services/AWSMacie2/Sources/AWSMacie2/Macie2Client.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class Macie2Client: ClientRuntime.Client { public static let clientName = "Macie2Client" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: Macie2Client.Macie2ClientConfiguration let serviceName = "Macie2" @@ -87,52 +87,54 @@ public class Macie2Client: ClientRuntime.Client { } extension Macie2Client { + public class Macie2ClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension Macie2Client { self.logger = telemetryProvider.loggerProvider.getLogger(name: Macie2Client.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMacie2AuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMacie2AuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMacie2AuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMacie2AuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultMacie2AuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultMacie2AuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(Macie2Client.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSMailManager/Sources/AWSMailManager/MailManagerClient.swift b/Sources/Services/AWSMailManager/Sources/AWSMailManager/MailManagerClient.swift index 46625a6da92..a550cc3b134 100644 --- a/Sources/Services/AWSMailManager/Sources/AWSMailManager/MailManagerClient.swift +++ b/Sources/Services/AWSMailManager/Sources/AWSMailManager/MailManagerClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class MailManagerClient: ClientRuntime.Client { public static let clientName = "MailManagerClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: MailManagerClient.MailManagerClientConfiguration let serviceName = "MailManager" @@ -87,52 +87,54 @@ public class MailManagerClient: ClientRuntime.Client { } extension MailManagerClient { + public class MailManagerClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension MailManagerClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: MailManagerClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMailManagerAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMailManagerAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMailManagerAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMailManagerAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultMailManagerAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultMailManagerAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(MailManagerClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSManagedBlockchain/Sources/AWSManagedBlockchain/ManagedBlockchainClient.swift b/Sources/Services/AWSManagedBlockchain/Sources/AWSManagedBlockchain/ManagedBlockchainClient.swift index c57b2a4cfae..7083724df7c 100644 --- a/Sources/Services/AWSManagedBlockchain/Sources/AWSManagedBlockchain/ManagedBlockchainClient.swift +++ b/Sources/Services/AWSManagedBlockchain/Sources/AWSManagedBlockchain/ManagedBlockchainClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ManagedBlockchainClient: ClientRuntime.Client { public static let clientName = "ManagedBlockchainClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ManagedBlockchainClient.ManagedBlockchainClientConfiguration let serviceName = "ManagedBlockchain" @@ -86,52 +86,54 @@ public class ManagedBlockchainClient: ClientRuntime.Client { } extension ManagedBlockchainClient { + public class ManagedBlockchainClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension ManagedBlockchainClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: ManagedBlockchainClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultManagedBlockchainAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultManagedBlockchainAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultManagedBlockchainAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultManagedBlockchainAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultManagedBlockchainAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultManagedBlockchainAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ManagedBlockchainClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSManagedBlockchainQuery/Sources/AWSManagedBlockchainQuery/ManagedBlockchainQueryClient.swift b/Sources/Services/AWSManagedBlockchainQuery/Sources/AWSManagedBlockchainQuery/ManagedBlockchainQueryClient.swift index 7bfcb497b7a..3b84f482fa4 100644 --- a/Sources/Services/AWSManagedBlockchainQuery/Sources/AWSManagedBlockchainQuery/ManagedBlockchainQueryClient.swift +++ b/Sources/Services/AWSManagedBlockchainQuery/Sources/AWSManagedBlockchainQuery/ManagedBlockchainQueryClient.swift @@ -62,7 +62,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ManagedBlockchainQueryClient: ClientRuntime.Client { public static let clientName = "ManagedBlockchainQueryClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ManagedBlockchainQueryClient.ManagedBlockchainQueryClientConfiguration let serviceName = "ManagedBlockchain Query" @@ -84,52 +84,54 @@ public class ManagedBlockchainQueryClient: ClientRuntime.Client { } extension ManagedBlockchainQueryClient { + public class ManagedBlockchainQueryClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -154,25 +156,158 @@ extension ManagedBlockchainQueryClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: ManagedBlockchainQueryClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultManagedBlockchainQueryAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultManagedBlockchainQueryAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultManagedBlockchainQueryAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultManagedBlockchainQueryAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultManagedBlockchainQueryAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultManagedBlockchainQueryAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ManagedBlockchainQueryClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSMarketplaceAgreement/Sources/AWSMarketplaceAgreement/MarketplaceAgreementClient.swift b/Sources/Services/AWSMarketplaceAgreement/Sources/AWSMarketplaceAgreement/MarketplaceAgreementClient.swift index 7af7852bfb1..ea1ef66ae83 100644 --- a/Sources/Services/AWSMarketplaceAgreement/Sources/AWSMarketplaceAgreement/MarketplaceAgreementClient.swift +++ b/Sources/Services/AWSMarketplaceAgreement/Sources/AWSMarketplaceAgreement/MarketplaceAgreementClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class MarketplaceAgreementClient: ClientRuntime.Client { public static let clientName = "MarketplaceAgreementClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: MarketplaceAgreementClient.MarketplaceAgreementClientConfiguration let serviceName = "Marketplace Agreement" @@ -86,52 +86,54 @@ public class MarketplaceAgreementClient: ClientRuntime.Client { } extension MarketplaceAgreementClient { + public class MarketplaceAgreementClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension MarketplaceAgreementClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: MarketplaceAgreementClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMarketplaceAgreementAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMarketplaceAgreementAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMarketplaceAgreementAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMarketplaceAgreementAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultMarketplaceAgreementAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultMarketplaceAgreementAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(MarketplaceAgreementClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSMarketplaceCatalog/Sources/AWSMarketplaceCatalog/MarketplaceCatalogClient.swift b/Sources/Services/AWSMarketplaceCatalog/Sources/AWSMarketplaceCatalog/MarketplaceCatalogClient.swift index 6dbbe0db31e..e3405a7b590 100644 --- a/Sources/Services/AWSMarketplaceCatalog/Sources/AWSMarketplaceCatalog/MarketplaceCatalogClient.swift +++ b/Sources/Services/AWSMarketplaceCatalog/Sources/AWSMarketplaceCatalog/MarketplaceCatalogClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class MarketplaceCatalogClient: ClientRuntime.Client { public static let clientName = "MarketplaceCatalogClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: MarketplaceCatalogClient.MarketplaceCatalogClientConfiguration let serviceName = "Marketplace Catalog" @@ -87,52 +87,54 @@ public class MarketplaceCatalogClient: ClientRuntime.Client { } extension MarketplaceCatalogClient { + public class MarketplaceCatalogClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension MarketplaceCatalogClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: MarketplaceCatalogClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMarketplaceCatalogAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMarketplaceCatalogAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMarketplaceCatalogAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMarketplaceCatalogAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultMarketplaceCatalogAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultMarketplaceCatalogAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(MarketplaceCatalogClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSMarketplaceCommerceAnalytics/Sources/AWSMarketplaceCommerceAnalytics/MarketplaceCommerceAnalyticsClient.swift b/Sources/Services/AWSMarketplaceCommerceAnalytics/Sources/AWSMarketplaceCommerceAnalytics/MarketplaceCommerceAnalyticsClient.swift index 51bdf5fcbb5..fcbc9f1094f 100644 --- a/Sources/Services/AWSMarketplaceCommerceAnalytics/Sources/AWSMarketplaceCommerceAnalytics/MarketplaceCommerceAnalyticsClient.swift +++ b/Sources/Services/AWSMarketplaceCommerceAnalytics/Sources/AWSMarketplaceCommerceAnalytics/MarketplaceCommerceAnalyticsClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class MarketplaceCommerceAnalyticsClient: ClientRuntime.Client { public static let clientName = "MarketplaceCommerceAnalyticsClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: MarketplaceCommerceAnalyticsClient.MarketplaceCommerceAnalyticsClientConfiguration let serviceName = "Marketplace Commerce Analytics" @@ -86,52 +86,54 @@ public class MarketplaceCommerceAnalyticsClient: ClientRuntime.Client { } extension MarketplaceCommerceAnalyticsClient { + public class MarketplaceCommerceAnalyticsClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension MarketplaceCommerceAnalyticsClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: MarketplaceCommerceAnalyticsClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMarketplaceCommerceAnalyticsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMarketplaceCommerceAnalyticsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMarketplaceCommerceAnalyticsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMarketplaceCommerceAnalyticsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultMarketplaceCommerceAnalyticsAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultMarketplaceCommerceAnalyticsAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(MarketplaceCommerceAnalyticsClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSMarketplaceDeployment/Sources/AWSMarketplaceDeployment/MarketplaceDeploymentClient.swift b/Sources/Services/AWSMarketplaceDeployment/Sources/AWSMarketplaceDeployment/MarketplaceDeploymentClient.swift index 4e83911d5e5..d87cef08534 100644 --- a/Sources/Services/AWSMarketplaceDeployment/Sources/AWSMarketplaceDeployment/MarketplaceDeploymentClient.swift +++ b/Sources/Services/AWSMarketplaceDeployment/Sources/AWSMarketplaceDeployment/MarketplaceDeploymentClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class MarketplaceDeploymentClient: ClientRuntime.Client { public static let clientName = "MarketplaceDeploymentClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: MarketplaceDeploymentClient.MarketplaceDeploymentClientConfiguration let serviceName = "Marketplace Deployment" @@ -87,52 +87,54 @@ public class MarketplaceDeploymentClient: ClientRuntime.Client { } extension MarketplaceDeploymentClient { + public class MarketplaceDeploymentClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension MarketplaceDeploymentClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: MarketplaceDeploymentClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMarketplaceDeploymentAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMarketplaceDeploymentAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMarketplaceDeploymentAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMarketplaceDeploymentAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultMarketplaceDeploymentAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultMarketplaceDeploymentAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(MarketplaceDeploymentClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSMarketplaceEntitlementService/Sources/AWSMarketplaceEntitlementService/MarketplaceEntitlementClient.swift b/Sources/Services/AWSMarketplaceEntitlementService/Sources/AWSMarketplaceEntitlementService/MarketplaceEntitlementClient.swift index 83ddb273d5e..29a14d0f8e8 100644 --- a/Sources/Services/AWSMarketplaceEntitlementService/Sources/AWSMarketplaceEntitlementService/MarketplaceEntitlementClient.swift +++ b/Sources/Services/AWSMarketplaceEntitlementService/Sources/AWSMarketplaceEntitlementService/MarketplaceEntitlementClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class MarketplaceEntitlementClient: ClientRuntime.Client { public static let clientName = "MarketplaceEntitlementClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: MarketplaceEntitlementClient.MarketplaceEntitlementClientConfiguration let serviceName = "Marketplace Entitlement" @@ -85,52 +85,54 @@ public class MarketplaceEntitlementClient: ClientRuntime.Client { } extension MarketplaceEntitlementClient { + public class MarketplaceEntitlementClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension MarketplaceEntitlementClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: MarketplaceEntitlementClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMarketplaceEntitlementServiceAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMarketplaceEntitlementServiceAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMarketplaceEntitlementServiceAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMarketplaceEntitlementServiceAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultMarketplaceEntitlementServiceAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultMarketplaceEntitlementServiceAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(MarketplaceEntitlementClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSMarketplaceMetering/Sources/AWSMarketplaceMetering/MarketplaceMeteringClient.swift b/Sources/Services/AWSMarketplaceMetering/Sources/AWSMarketplaceMetering/MarketplaceMeteringClient.swift index 85d1d60d486..447311c1074 100644 --- a/Sources/Services/AWSMarketplaceMetering/Sources/AWSMarketplaceMetering/MarketplaceMeteringClient.swift +++ b/Sources/Services/AWSMarketplaceMetering/Sources/AWSMarketplaceMetering/MarketplaceMeteringClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class MarketplaceMeteringClient: ClientRuntime.Client { public static let clientName = "MarketplaceMeteringClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: MarketplaceMeteringClient.MarketplaceMeteringClientConfiguration let serviceName = "Marketplace Metering" @@ -86,52 +86,54 @@ public class MarketplaceMeteringClient: ClientRuntime.Client { } extension MarketplaceMeteringClient { + public class MarketplaceMeteringClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension MarketplaceMeteringClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: MarketplaceMeteringClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMarketplaceMeteringAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMarketplaceMeteringAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMarketplaceMeteringAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMarketplaceMeteringAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultMarketplaceMeteringAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultMarketplaceMeteringAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(MarketplaceMeteringClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSMarketplaceReporting/Sources/AWSMarketplaceReporting/MarketplaceReportingClient.swift b/Sources/Services/AWSMarketplaceReporting/Sources/AWSMarketplaceReporting/MarketplaceReportingClient.swift index 3bcfc31b63d..550dfbe5d80 100644 --- a/Sources/Services/AWSMarketplaceReporting/Sources/AWSMarketplaceReporting/MarketplaceReportingClient.swift +++ b/Sources/Services/AWSMarketplaceReporting/Sources/AWSMarketplaceReporting/MarketplaceReportingClient.swift @@ -62,7 +62,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class MarketplaceReportingClient: ClientRuntime.Client { public static let clientName = "MarketplaceReportingClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: MarketplaceReportingClient.MarketplaceReportingClientConfiguration let serviceName = "Marketplace Reporting" @@ -84,52 +84,54 @@ public class MarketplaceReportingClient: ClientRuntime.Client { } extension MarketplaceReportingClient { + public class MarketplaceReportingClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -154,25 +156,158 @@ extension MarketplaceReportingClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: MarketplaceReportingClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMarketplaceReportingAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMarketplaceReportingAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMarketplaceReportingAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMarketplaceReportingAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultMarketplaceReportingAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultMarketplaceReportingAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(MarketplaceReportingClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSMediaConnect/Sources/AWSMediaConnect/MediaConnectClient.swift b/Sources/Services/AWSMediaConnect/Sources/AWSMediaConnect/MediaConnectClient.swift index 54c1d3011b2..c299b9e2e27 100644 --- a/Sources/Services/AWSMediaConnect/Sources/AWSMediaConnect/MediaConnectClient.swift +++ b/Sources/Services/AWSMediaConnect/Sources/AWSMediaConnect/MediaConnectClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class MediaConnectClient: ClientRuntime.Client { public static let clientName = "MediaConnectClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: MediaConnectClient.MediaConnectClientConfiguration let serviceName = "MediaConnect" @@ -86,52 +86,54 @@ public class MediaConnectClient: ClientRuntime.Client { } extension MediaConnectClient { + public class MediaConnectClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension MediaConnectClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: MediaConnectClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMediaConnectAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMediaConnectAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMediaConnectAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMediaConnectAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultMediaConnectAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultMediaConnectAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(MediaConnectClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSMediaConvert/Sources/AWSMediaConvert/MediaConvertClient.swift b/Sources/Services/AWSMediaConvert/Sources/AWSMediaConvert/MediaConvertClient.swift index 606486addbd..ca0dac02be8 100644 --- a/Sources/Services/AWSMediaConvert/Sources/AWSMediaConvert/MediaConvertClient.swift +++ b/Sources/Services/AWSMediaConvert/Sources/AWSMediaConvert/MediaConvertClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class MediaConvertClient: ClientRuntime.Client { public static let clientName = "MediaConvertClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: MediaConvertClient.MediaConvertClientConfiguration let serviceName = "MediaConvert" @@ -86,52 +86,54 @@ public class MediaConvertClient: ClientRuntime.Client { } extension MediaConvertClient { + public class MediaConvertClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension MediaConvertClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: MediaConvertClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMediaConvertAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMediaConvertAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMediaConvertAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMediaConvertAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultMediaConvertAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultMediaConvertAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(MediaConvertClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSMediaLive/Sources/AWSMediaLive/MediaLiveClient.swift b/Sources/Services/AWSMediaLive/Sources/AWSMediaLive/MediaLiveClient.swift index 0f2e6306ae7..cf1ac1c6122 100644 --- a/Sources/Services/AWSMediaLive/Sources/AWSMediaLive/MediaLiveClient.swift +++ b/Sources/Services/AWSMediaLive/Sources/AWSMediaLive/MediaLiveClient.swift @@ -67,7 +67,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class MediaLiveClient: ClientRuntime.Client { public static let clientName = "MediaLiveClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: MediaLiveClient.MediaLiveClientConfiguration let serviceName = "MediaLive" @@ -89,52 +89,54 @@ public class MediaLiveClient: ClientRuntime.Client { } extension MediaLiveClient { + public class MediaLiveClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -159,25 +161,158 @@ extension MediaLiveClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: MediaLiveClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMediaLiveAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMediaLiveAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMediaLiveAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMediaLiveAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultMediaLiveAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultMediaLiveAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(MediaLiveClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSMediaPackage/Sources/AWSMediaPackage/MediaPackageClient.swift b/Sources/Services/AWSMediaPackage/Sources/AWSMediaPackage/MediaPackageClient.swift index f59abb6121e..f76b574f206 100644 --- a/Sources/Services/AWSMediaPackage/Sources/AWSMediaPackage/MediaPackageClient.swift +++ b/Sources/Services/AWSMediaPackage/Sources/AWSMediaPackage/MediaPackageClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class MediaPackageClient: ClientRuntime.Client { public static let clientName = "MediaPackageClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: MediaPackageClient.MediaPackageClientConfiguration let serviceName = "MediaPackage" @@ -85,52 +85,54 @@ public class MediaPackageClient: ClientRuntime.Client { } extension MediaPackageClient { + public class MediaPackageClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension MediaPackageClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: MediaPackageClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMediaPackageAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMediaPackageAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMediaPackageAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMediaPackageAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultMediaPackageAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultMediaPackageAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(MediaPackageClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSMediaPackageV2/Sources/AWSMediaPackageV2/MediaPackageV2Client.swift b/Sources/Services/AWSMediaPackageV2/Sources/AWSMediaPackageV2/MediaPackageV2Client.swift index 93ae1c21d9d..6ffdc83f27a 100644 --- a/Sources/Services/AWSMediaPackageV2/Sources/AWSMediaPackageV2/MediaPackageV2Client.swift +++ b/Sources/Services/AWSMediaPackageV2/Sources/AWSMediaPackageV2/MediaPackageV2Client.swift @@ -66,7 +66,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class MediaPackageV2Client: ClientRuntime.Client { public static let clientName = "MediaPackageV2Client" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: MediaPackageV2Client.MediaPackageV2ClientConfiguration let serviceName = "MediaPackageV2" @@ -88,52 +88,54 @@ public class MediaPackageV2Client: ClientRuntime.Client { } extension MediaPackageV2Client { + public class MediaPackageV2ClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -158,25 +160,158 @@ extension MediaPackageV2Client { self.logger = telemetryProvider.loggerProvider.getLogger(name: MediaPackageV2Client.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMediaPackageV2AuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMediaPackageV2AuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMediaPackageV2AuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMediaPackageV2AuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultMediaPackageV2AuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultMediaPackageV2AuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(MediaPackageV2Client.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSMediaPackageVod/Sources/AWSMediaPackageVod/MediaPackageVodClient.swift b/Sources/Services/AWSMediaPackageVod/Sources/AWSMediaPackageVod/MediaPackageVodClient.swift index 6c17b654658..a2ca3887bfa 100644 --- a/Sources/Services/AWSMediaPackageVod/Sources/AWSMediaPackageVod/MediaPackageVodClient.swift +++ b/Sources/Services/AWSMediaPackageVod/Sources/AWSMediaPackageVod/MediaPackageVodClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class MediaPackageVodClient: ClientRuntime.Client { public static let clientName = "MediaPackageVodClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: MediaPackageVodClient.MediaPackageVodClientConfiguration let serviceName = "MediaPackage Vod" @@ -85,52 +85,54 @@ public class MediaPackageVodClient: ClientRuntime.Client { } extension MediaPackageVodClient { + public class MediaPackageVodClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension MediaPackageVodClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: MediaPackageVodClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMediaPackageVodAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMediaPackageVodAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMediaPackageVodAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMediaPackageVodAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultMediaPackageVodAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultMediaPackageVodAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(MediaPackageVodClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSMediaStore/Sources/AWSMediaStore/MediaStoreClient.swift b/Sources/Services/AWSMediaStore/Sources/AWSMediaStore/MediaStoreClient.swift index c24d14f764f..d2799f7fa00 100644 --- a/Sources/Services/AWSMediaStore/Sources/AWSMediaStore/MediaStoreClient.swift +++ b/Sources/Services/AWSMediaStore/Sources/AWSMediaStore/MediaStoreClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class MediaStoreClient: ClientRuntime.Client { public static let clientName = "MediaStoreClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: MediaStoreClient.MediaStoreClientConfiguration let serviceName = "MediaStore" @@ -85,52 +85,54 @@ public class MediaStoreClient: ClientRuntime.Client { } extension MediaStoreClient { + public class MediaStoreClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension MediaStoreClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: MediaStoreClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMediaStoreAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMediaStoreAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMediaStoreAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMediaStoreAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultMediaStoreAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultMediaStoreAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(MediaStoreClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSMediaStoreData/Sources/AWSMediaStoreData/MediaStoreDataClient.swift b/Sources/Services/AWSMediaStoreData/Sources/AWSMediaStoreData/MediaStoreDataClient.swift index 955b7f01f29..c0e40ac22ea 100644 --- a/Sources/Services/AWSMediaStoreData/Sources/AWSMediaStoreData/MediaStoreDataClient.swift +++ b/Sources/Services/AWSMediaStoreData/Sources/AWSMediaStoreData/MediaStoreDataClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class MediaStoreDataClient: ClientRuntime.Client { public static let clientName = "MediaStoreDataClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: MediaStoreDataClient.MediaStoreDataClientConfiguration let serviceName = "MediaStore Data" @@ -87,52 +87,54 @@ public class MediaStoreDataClient: ClientRuntime.Client { } extension MediaStoreDataClient { + public class MediaStoreDataClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension MediaStoreDataClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: MediaStoreDataClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMediaStoreDataAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMediaStoreDataAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMediaStoreDataAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMediaStoreDataAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultMediaStoreDataAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultMediaStoreDataAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(MediaStoreDataClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSMediaTailor/Sources/AWSMediaTailor/MediaTailorClient.swift b/Sources/Services/AWSMediaTailor/Sources/AWSMediaTailor/MediaTailorClient.swift index 1c0a0799e90..a7101af26f4 100644 --- a/Sources/Services/AWSMediaTailor/Sources/AWSMediaTailor/MediaTailorClient.swift +++ b/Sources/Services/AWSMediaTailor/Sources/AWSMediaTailor/MediaTailorClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class MediaTailorClient: ClientRuntime.Client { public static let clientName = "MediaTailorClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: MediaTailorClient.MediaTailorClientConfiguration let serviceName = "MediaTailor" @@ -86,52 +86,54 @@ public class MediaTailorClient: ClientRuntime.Client { } extension MediaTailorClient { + public class MediaTailorClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension MediaTailorClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: MediaTailorClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMediaTailorAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMediaTailorAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMediaTailorAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMediaTailorAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultMediaTailorAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultMediaTailorAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(MediaTailorClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSMedicalImaging/Sources/AWSMedicalImaging/MedicalImagingClient.swift b/Sources/Services/AWSMedicalImaging/Sources/AWSMedicalImaging/MedicalImagingClient.swift index 8fcda9c7bda..6f58d916970 100644 --- a/Sources/Services/AWSMedicalImaging/Sources/AWSMedicalImaging/MedicalImagingClient.swift +++ b/Sources/Services/AWSMedicalImaging/Sources/AWSMedicalImaging/MedicalImagingClient.swift @@ -67,7 +67,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class MedicalImagingClient: ClientRuntime.Client { public static let clientName = "MedicalImagingClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: MedicalImagingClient.MedicalImagingClientConfiguration let serviceName = "Medical Imaging" @@ -89,52 +89,54 @@ public class MedicalImagingClient: ClientRuntime.Client { } extension MedicalImagingClient { + public class MedicalImagingClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -159,25 +161,158 @@ extension MedicalImagingClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: MedicalImagingClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMedicalImagingAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMedicalImagingAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMedicalImagingAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMedicalImagingAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultMedicalImagingAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultMedicalImagingAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(MedicalImagingClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSMemoryDB/Sources/AWSMemoryDB/MemoryDBClient.swift b/Sources/Services/AWSMemoryDB/Sources/AWSMemoryDB/MemoryDBClient.swift index 7bb8cbe6fb4..d474ac8188b 100644 --- a/Sources/Services/AWSMemoryDB/Sources/AWSMemoryDB/MemoryDBClient.swift +++ b/Sources/Services/AWSMemoryDB/Sources/AWSMemoryDB/MemoryDBClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class MemoryDBClient: ClientRuntime.Client { public static let clientName = "MemoryDBClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: MemoryDBClient.MemoryDBClientConfiguration let serviceName = "MemoryDB" @@ -86,52 +86,54 @@ public class MemoryDBClient: ClientRuntime.Client { } extension MemoryDBClient { + public class MemoryDBClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension MemoryDBClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: MemoryDBClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMemoryDBAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMemoryDBAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMemoryDBAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMemoryDBAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultMemoryDBAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultMemoryDBAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(MemoryDBClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSMgn/Sources/AWSMgn/MgnClient.swift b/Sources/Services/AWSMgn/Sources/AWSMgn/MgnClient.swift index d2a59bb2517..70a99dc9138 100644 --- a/Sources/Services/AWSMgn/Sources/AWSMgn/MgnClient.swift +++ b/Sources/Services/AWSMgn/Sources/AWSMgn/MgnClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class MgnClient: ClientRuntime.Client { public static let clientName = "MgnClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: MgnClient.MgnClientConfiguration let serviceName = "mgn" @@ -86,52 +86,54 @@ public class MgnClient: ClientRuntime.Client { } extension MgnClient { + public class MgnClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension MgnClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: MgnClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMgnAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMgnAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMgnAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMgnAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultMgnAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultMgnAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(MgnClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSMigrationHub/Sources/AWSMigrationHub/MigrationHubClient.swift b/Sources/Services/AWSMigrationHub/Sources/AWSMigrationHub/MigrationHubClient.swift index 687db79bb38..312076af6e8 100644 --- a/Sources/Services/AWSMigrationHub/Sources/AWSMigrationHub/MigrationHubClient.swift +++ b/Sources/Services/AWSMigrationHub/Sources/AWSMigrationHub/MigrationHubClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class MigrationHubClient: ClientRuntime.Client { public static let clientName = "MigrationHubClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: MigrationHubClient.MigrationHubClientConfiguration let serviceName = "Migration Hub" @@ -86,52 +86,54 @@ public class MigrationHubClient: ClientRuntime.Client { } extension MigrationHubClient { + public class MigrationHubClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension MigrationHubClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: MigrationHubClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMigrationHubAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMigrationHubAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMigrationHubAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMigrationHubAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultMigrationHubAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultMigrationHubAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(MigrationHubClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSMigrationHubConfig/Sources/AWSMigrationHubConfig/MigrationHubConfigClient.swift b/Sources/Services/AWSMigrationHubConfig/Sources/AWSMigrationHubConfig/MigrationHubConfigClient.swift index f24e240ef48..24c53618029 100644 --- a/Sources/Services/AWSMigrationHubConfig/Sources/AWSMigrationHubConfig/MigrationHubConfigClient.swift +++ b/Sources/Services/AWSMigrationHubConfig/Sources/AWSMigrationHubConfig/MigrationHubConfigClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class MigrationHubConfigClient: ClientRuntime.Client { public static let clientName = "MigrationHubConfigClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: MigrationHubConfigClient.MigrationHubConfigClientConfiguration let serviceName = "MigrationHub Config" @@ -85,52 +85,54 @@ public class MigrationHubConfigClient: ClientRuntime.Client { } extension MigrationHubConfigClient { + public class MigrationHubConfigClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension MigrationHubConfigClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: MigrationHubConfigClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMigrationHubConfigAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMigrationHubConfigAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMigrationHubConfigAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMigrationHubConfigAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultMigrationHubConfigAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultMigrationHubConfigAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(MigrationHubConfigClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSMigrationHubOrchestrator/Sources/AWSMigrationHubOrchestrator/MigrationHubOrchestratorClient.swift b/Sources/Services/AWSMigrationHubOrchestrator/Sources/AWSMigrationHubOrchestrator/MigrationHubOrchestratorClient.swift index 8dc9074722f..ead7807a5e8 100644 --- a/Sources/Services/AWSMigrationHubOrchestrator/Sources/AWSMigrationHubOrchestrator/MigrationHubOrchestratorClient.swift +++ b/Sources/Services/AWSMigrationHubOrchestrator/Sources/AWSMigrationHubOrchestrator/MigrationHubOrchestratorClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class MigrationHubOrchestratorClient: ClientRuntime.Client { public static let clientName = "MigrationHubOrchestratorClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: MigrationHubOrchestratorClient.MigrationHubOrchestratorClientConfiguration let serviceName = "MigrationHubOrchestrator" @@ -87,52 +87,54 @@ public class MigrationHubOrchestratorClient: ClientRuntime.Client { } extension MigrationHubOrchestratorClient { + public class MigrationHubOrchestratorClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension MigrationHubOrchestratorClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: MigrationHubOrchestratorClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMigrationHubOrchestratorAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMigrationHubOrchestratorAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMigrationHubOrchestratorAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMigrationHubOrchestratorAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultMigrationHubOrchestratorAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultMigrationHubOrchestratorAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(MigrationHubOrchestratorClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSMigrationHubRefactorSpaces/Sources/AWSMigrationHubRefactorSpaces/MigrationHubRefactorSpacesClient.swift b/Sources/Services/AWSMigrationHubRefactorSpaces/Sources/AWSMigrationHubRefactorSpaces/MigrationHubRefactorSpacesClient.swift index 7d3954c87fd..8e6387b1421 100644 --- a/Sources/Services/AWSMigrationHubRefactorSpaces/Sources/AWSMigrationHubRefactorSpaces/MigrationHubRefactorSpacesClient.swift +++ b/Sources/Services/AWSMigrationHubRefactorSpaces/Sources/AWSMigrationHubRefactorSpaces/MigrationHubRefactorSpacesClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class MigrationHubRefactorSpacesClient: ClientRuntime.Client { public static let clientName = "MigrationHubRefactorSpacesClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: MigrationHubRefactorSpacesClient.MigrationHubRefactorSpacesClientConfiguration let serviceName = "Migration Hub Refactor Spaces" @@ -87,52 +87,54 @@ public class MigrationHubRefactorSpacesClient: ClientRuntime.Client { } extension MigrationHubRefactorSpacesClient { + public class MigrationHubRefactorSpacesClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension MigrationHubRefactorSpacesClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: MigrationHubRefactorSpacesClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMigrationHubRefactorSpacesAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMigrationHubRefactorSpacesAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMigrationHubRefactorSpacesAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMigrationHubRefactorSpacesAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultMigrationHubRefactorSpacesAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultMigrationHubRefactorSpacesAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(MigrationHubRefactorSpacesClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSMigrationHubStrategy/Sources/AWSMigrationHubStrategy/MigrationHubStrategyClient.swift b/Sources/Services/AWSMigrationHubStrategy/Sources/AWSMigrationHubStrategy/MigrationHubStrategyClient.swift index c964e19de08..de802fabebd 100644 --- a/Sources/Services/AWSMigrationHubStrategy/Sources/AWSMigrationHubStrategy/MigrationHubStrategyClient.swift +++ b/Sources/Services/AWSMigrationHubStrategy/Sources/AWSMigrationHubStrategy/MigrationHubStrategyClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class MigrationHubStrategyClient: ClientRuntime.Client { public static let clientName = "MigrationHubStrategyClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: MigrationHubStrategyClient.MigrationHubStrategyClientConfiguration let serviceName = "MigrationHubStrategy" @@ -86,52 +86,54 @@ public class MigrationHubStrategyClient: ClientRuntime.Client { } extension MigrationHubStrategyClient { + public class MigrationHubStrategyClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension MigrationHubStrategyClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: MigrationHubStrategyClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMigrationHubStrategyAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMigrationHubStrategyAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMigrationHubStrategyAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMigrationHubStrategyAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultMigrationHubStrategyAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultMigrationHubStrategyAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(MigrationHubStrategyClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSMq/Sources/AWSMq/MqClient.swift b/Sources/Services/AWSMq/Sources/AWSMq/MqClient.swift index 33bc7308d28..751dc0025e3 100644 --- a/Sources/Services/AWSMq/Sources/AWSMq/MqClient.swift +++ b/Sources/Services/AWSMq/Sources/AWSMq/MqClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class MqClient: ClientRuntime.Client { public static let clientName = "MqClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: MqClient.MqClientConfiguration let serviceName = "mq" @@ -87,52 +87,54 @@ public class MqClient: ClientRuntime.Client { } extension MqClient { + public class MqClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension MqClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: MqClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMqAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMqAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultMqAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultMqAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultMqAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultMqAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(MqClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSNeptune/Sources/AWSNeptune/NeptuneClient.swift b/Sources/Services/AWSNeptune/Sources/AWSNeptune/NeptuneClient.swift index 6bcc4242aa2..b89c5bc6fd3 100644 --- a/Sources/Services/AWSNeptune/Sources/AWSNeptune/NeptuneClient.swift +++ b/Sources/Services/AWSNeptune/Sources/AWSNeptune/NeptuneClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class NeptuneClient: ClientRuntime.Client { public static let clientName = "NeptuneClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: NeptuneClient.NeptuneClientConfiguration let serviceName = "Neptune" @@ -85,52 +85,54 @@ public class NeptuneClient: ClientRuntime.Client { } extension NeptuneClient { + public class NeptuneClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension NeptuneClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: NeptuneClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultNeptuneAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultNeptuneAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultNeptuneAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultNeptuneAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultNeptuneAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultNeptuneAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(NeptuneClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSNeptuneGraph/Sources/AWSNeptuneGraph/NeptuneGraphClient.swift b/Sources/Services/AWSNeptuneGraph/Sources/AWSNeptuneGraph/NeptuneGraphClient.swift index 051effd73b1..9437cef5ad8 100644 --- a/Sources/Services/AWSNeptuneGraph/Sources/AWSNeptuneGraph/NeptuneGraphClient.swift +++ b/Sources/Services/AWSNeptuneGraph/Sources/AWSNeptuneGraph/NeptuneGraphClient.swift @@ -67,7 +67,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class NeptuneGraphClient: ClientRuntime.Client { public static let clientName = "NeptuneGraphClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: NeptuneGraphClient.NeptuneGraphClientConfiguration let serviceName = "Neptune Graph" @@ -89,52 +89,54 @@ public class NeptuneGraphClient: ClientRuntime.Client { } extension NeptuneGraphClient { + public class NeptuneGraphClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -159,25 +161,158 @@ extension NeptuneGraphClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: NeptuneGraphClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultNeptuneGraphAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultNeptuneGraphAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultNeptuneGraphAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultNeptuneGraphAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultNeptuneGraphAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultNeptuneGraphAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(NeptuneGraphClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSNeptunedata/Sources/AWSNeptunedata/NeptunedataClient.swift b/Sources/Services/AWSNeptunedata/Sources/AWSNeptunedata/NeptunedataClient.swift index 47e6ecd3c78..ec84d73342c 100644 --- a/Sources/Services/AWSNeptunedata/Sources/AWSNeptunedata/NeptunedataClient.swift +++ b/Sources/Services/AWSNeptunedata/Sources/AWSNeptunedata/NeptunedataClient.swift @@ -66,7 +66,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class NeptunedataClient: ClientRuntime.Client { public static let clientName = "NeptunedataClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: NeptunedataClient.NeptunedataClientConfiguration let serviceName = "neptunedata" @@ -88,52 +88,54 @@ public class NeptunedataClient: ClientRuntime.Client { } extension NeptunedataClient { + public class NeptunedataClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -158,25 +160,158 @@ extension NeptunedataClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: NeptunedataClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultNeptunedataAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultNeptunedataAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultNeptunedataAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultNeptunedataAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultNeptunedataAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultNeptunedataAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(NeptunedataClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSNetworkFirewall/Sources/AWSNetworkFirewall/NetworkFirewallClient.swift b/Sources/Services/AWSNetworkFirewall/Sources/AWSNetworkFirewall/NetworkFirewallClient.swift index 68e0790a8ed..8d0d1478bed 100644 --- a/Sources/Services/AWSNetworkFirewall/Sources/AWSNetworkFirewall/NetworkFirewallClient.swift +++ b/Sources/Services/AWSNetworkFirewall/Sources/AWSNetworkFirewall/NetworkFirewallClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class NetworkFirewallClient: ClientRuntime.Client { public static let clientName = "NetworkFirewallClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: NetworkFirewallClient.NetworkFirewallClientConfiguration let serviceName = "Network Firewall" @@ -86,52 +86,54 @@ public class NetworkFirewallClient: ClientRuntime.Client { } extension NetworkFirewallClient { + public class NetworkFirewallClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension NetworkFirewallClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: NetworkFirewallClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultNetworkFirewallAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultNetworkFirewallAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultNetworkFirewallAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultNetworkFirewallAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultNetworkFirewallAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultNetworkFirewallAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(NetworkFirewallClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSNetworkFlowMonitor/Sources/AWSNetworkFlowMonitor/NetworkFlowMonitorClient.swift b/Sources/Services/AWSNetworkFlowMonitor/Sources/AWSNetworkFlowMonitor/NetworkFlowMonitorClient.swift index 4d18b93ca23..82e4f4983b5 100644 --- a/Sources/Services/AWSNetworkFlowMonitor/Sources/AWSNetworkFlowMonitor/NetworkFlowMonitorClient.swift +++ b/Sources/Services/AWSNetworkFlowMonitor/Sources/AWSNetworkFlowMonitor/NetworkFlowMonitorClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class NetworkFlowMonitorClient: ClientRuntime.Client { public static let clientName = "NetworkFlowMonitorClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: NetworkFlowMonitorClient.NetworkFlowMonitorClientConfiguration let serviceName = "NetworkFlowMonitor" @@ -87,52 +87,54 @@ public class NetworkFlowMonitorClient: ClientRuntime.Client { } extension NetworkFlowMonitorClient { + public class NetworkFlowMonitorClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension NetworkFlowMonitorClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: NetworkFlowMonitorClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultNetworkFlowMonitorAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultNetworkFlowMonitorAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultNetworkFlowMonitorAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultNetworkFlowMonitorAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultNetworkFlowMonitorAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultNetworkFlowMonitorAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(NetworkFlowMonitorClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSNetworkManager/Sources/AWSNetworkManager/NetworkManagerClient.swift b/Sources/Services/AWSNetworkManager/Sources/AWSNetworkManager/NetworkManagerClient.swift index 33ba79f294d..8f1b265539b 100644 --- a/Sources/Services/AWSNetworkManager/Sources/AWSNetworkManager/NetworkManagerClient.swift +++ b/Sources/Services/AWSNetworkManager/Sources/AWSNetworkManager/NetworkManagerClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class NetworkManagerClient: ClientRuntime.Client { public static let clientName = "NetworkManagerClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: NetworkManagerClient.NetworkManagerClientConfiguration let serviceName = "NetworkManager" @@ -87,52 +87,54 @@ public class NetworkManagerClient: ClientRuntime.Client { } extension NetworkManagerClient { + public class NetworkManagerClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension NetworkManagerClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: NetworkManagerClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultNetworkManagerAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultNetworkManagerAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultNetworkManagerAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultNetworkManagerAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultNetworkManagerAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultNetworkManagerAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(NetworkManagerClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSNetworkMonitor/Sources/AWSNetworkMonitor/NetworkMonitorClient.swift b/Sources/Services/AWSNetworkMonitor/Sources/AWSNetworkMonitor/NetworkMonitorClient.swift index 294b7cb60ed..07d69869ae9 100644 --- a/Sources/Services/AWSNetworkMonitor/Sources/AWSNetworkMonitor/NetworkMonitorClient.swift +++ b/Sources/Services/AWSNetworkMonitor/Sources/AWSNetworkMonitor/NetworkMonitorClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class NetworkMonitorClient: ClientRuntime.Client { public static let clientName = "NetworkMonitorClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: NetworkMonitorClient.NetworkMonitorClientConfiguration let serviceName = "NetworkMonitor" @@ -87,52 +87,54 @@ public class NetworkMonitorClient: ClientRuntime.Client { } extension NetworkMonitorClient { + public class NetworkMonitorClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension NetworkMonitorClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: NetworkMonitorClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultNetworkMonitorAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultNetworkMonitorAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultNetworkMonitorAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultNetworkMonitorAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultNetworkMonitorAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultNetworkMonitorAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(NetworkMonitorClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSNotifications/Sources/AWSNotifications/NotificationsClient.swift b/Sources/Services/AWSNotifications/Sources/AWSNotifications/NotificationsClient.swift index 4267d70f48c..84fb89ac2e1 100644 --- a/Sources/Services/AWSNotifications/Sources/AWSNotifications/NotificationsClient.swift +++ b/Sources/Services/AWSNotifications/Sources/AWSNotifications/NotificationsClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class NotificationsClient: ClientRuntime.Client { public static let clientName = "NotificationsClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: NotificationsClient.NotificationsClientConfiguration let serviceName = "Notifications" @@ -86,52 +86,54 @@ public class NotificationsClient: ClientRuntime.Client { } extension NotificationsClient { + public class NotificationsClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension NotificationsClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: NotificationsClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultNotificationsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultNotificationsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultNotificationsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultNotificationsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultNotificationsAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultNotificationsAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(NotificationsClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSNotificationsContacts/Sources/AWSNotificationsContacts/NotificationsContactsClient.swift b/Sources/Services/AWSNotificationsContacts/Sources/AWSNotificationsContacts/NotificationsContactsClient.swift index f7c7d7d62c6..19fd2225deb 100644 --- a/Sources/Services/AWSNotificationsContacts/Sources/AWSNotificationsContacts/NotificationsContactsClient.swift +++ b/Sources/Services/AWSNotificationsContacts/Sources/AWSNotificationsContacts/NotificationsContactsClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class NotificationsContactsClient: ClientRuntime.Client { public static let clientName = "NotificationsContactsClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: NotificationsContactsClient.NotificationsContactsClientConfiguration let serviceName = "NotificationsContacts" @@ -85,52 +85,54 @@ public class NotificationsContactsClient: ClientRuntime.Client { } extension NotificationsContactsClient { + public class NotificationsContactsClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension NotificationsContactsClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: NotificationsContactsClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultNotificationsContactsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultNotificationsContactsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultNotificationsContactsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultNotificationsContactsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultNotificationsContactsAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultNotificationsContactsAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(NotificationsContactsClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSOAM/Sources/AWSOAM/OAMClient.swift b/Sources/Services/AWSOAM/Sources/AWSOAM/OAMClient.swift index 0635654f840..de8f287d13b 100644 --- a/Sources/Services/AWSOAM/Sources/AWSOAM/OAMClient.swift +++ b/Sources/Services/AWSOAM/Sources/AWSOAM/OAMClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class OAMClient: ClientRuntime.Client { public static let clientName = "OAMClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: OAMClient.OAMClientConfiguration let serviceName = "OAM" @@ -85,52 +85,54 @@ public class OAMClient: ClientRuntime.Client { } extension OAMClient { + public class OAMClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension OAMClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: OAMClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultOAMAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultOAMAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultOAMAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultOAMAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultOAMAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultOAMAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(OAMClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSOSIS/Sources/AWSOSIS/OSISClient.swift b/Sources/Services/AWSOSIS/Sources/AWSOSIS/OSISClient.swift index af3dfdf0e1a..dd51455d640 100644 --- a/Sources/Services/AWSOSIS/Sources/AWSOSIS/OSISClient.swift +++ b/Sources/Services/AWSOSIS/Sources/AWSOSIS/OSISClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class OSISClient: ClientRuntime.Client { public static let clientName = "OSISClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: OSISClient.OSISClientConfiguration let serviceName = "OSIS" @@ -85,52 +85,54 @@ public class OSISClient: ClientRuntime.Client { } extension OSISClient { + public class OSISClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension OSISClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: OSISClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultOSISAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultOSISAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultOSISAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultOSISAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultOSISAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultOSISAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(OSISClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSObservabilityAdmin/Sources/AWSObservabilityAdmin/ObservabilityAdminClient.swift b/Sources/Services/AWSObservabilityAdmin/Sources/AWSObservabilityAdmin/ObservabilityAdminClient.swift index 0921b02196e..1dc0a5afb88 100644 --- a/Sources/Services/AWSObservabilityAdmin/Sources/AWSObservabilityAdmin/ObservabilityAdminClient.swift +++ b/Sources/Services/AWSObservabilityAdmin/Sources/AWSObservabilityAdmin/ObservabilityAdminClient.swift @@ -62,7 +62,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ObservabilityAdminClient: ClientRuntime.Client { public static let clientName = "ObservabilityAdminClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ObservabilityAdminClient.ObservabilityAdminClientConfiguration let serviceName = "ObservabilityAdmin" @@ -84,52 +84,54 @@ public class ObservabilityAdminClient: ClientRuntime.Client { } extension ObservabilityAdminClient { + public class ObservabilityAdminClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -154,25 +156,158 @@ extension ObservabilityAdminClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: ObservabilityAdminClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultObservabilityAdminAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultObservabilityAdminAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultObservabilityAdminAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultObservabilityAdminAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultObservabilityAdminAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultObservabilityAdminAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ObservabilityAdminClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSOmics/Sources/AWSOmics/OmicsClient.swift b/Sources/Services/AWSOmics/Sources/AWSOmics/OmicsClient.swift index 43ccbd140fc..621e49a2650 100644 --- a/Sources/Services/AWSOmics/Sources/AWSOmics/OmicsClient.swift +++ b/Sources/Services/AWSOmics/Sources/AWSOmics/OmicsClient.swift @@ -70,7 +70,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class OmicsClient: ClientRuntime.Client { public static let clientName = "OmicsClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: OmicsClient.OmicsClientConfiguration let serviceName = "Omics" @@ -92,52 +92,54 @@ public class OmicsClient: ClientRuntime.Client { } extension OmicsClient { + public class OmicsClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -162,25 +164,158 @@ extension OmicsClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: OmicsClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultOmicsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultOmicsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultOmicsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultOmicsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultOmicsAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultOmicsAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(OmicsClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSOpenSearch/Sources/AWSOpenSearch/OpenSearchClient.swift b/Sources/Services/AWSOpenSearch/Sources/AWSOpenSearch/OpenSearchClient.swift index ab6f0424335..9d1bd9b6bcd 100644 --- a/Sources/Services/AWSOpenSearch/Sources/AWSOpenSearch/OpenSearchClient.swift +++ b/Sources/Services/AWSOpenSearch/Sources/AWSOpenSearch/OpenSearchClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class OpenSearchClient: ClientRuntime.Client { public static let clientName = "OpenSearchClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: OpenSearchClient.OpenSearchClientConfiguration let serviceName = "OpenSearch" @@ -87,52 +87,54 @@ public class OpenSearchClient: ClientRuntime.Client { } extension OpenSearchClient { + public class OpenSearchClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension OpenSearchClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: OpenSearchClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultOpenSearchAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultOpenSearchAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultOpenSearchAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultOpenSearchAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultOpenSearchAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultOpenSearchAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(OpenSearchClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSOpenSearchServerless/Sources/AWSOpenSearchServerless/OpenSearchServerlessClient.swift b/Sources/Services/AWSOpenSearchServerless/Sources/AWSOpenSearchServerless/OpenSearchServerlessClient.swift index ea526dcfaa2..72ccf437ec8 100644 --- a/Sources/Services/AWSOpenSearchServerless/Sources/AWSOpenSearchServerless/OpenSearchServerlessClient.swift +++ b/Sources/Services/AWSOpenSearchServerless/Sources/AWSOpenSearchServerless/OpenSearchServerlessClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class OpenSearchServerlessClient: ClientRuntime.Client { public static let clientName = "OpenSearchServerlessClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: OpenSearchServerlessClient.OpenSearchServerlessClientConfiguration let serviceName = "OpenSearchServerless" @@ -86,52 +86,54 @@ public class OpenSearchServerlessClient: ClientRuntime.Client { } extension OpenSearchServerlessClient { + public class OpenSearchServerlessClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension OpenSearchServerlessClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: OpenSearchServerlessClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultOpenSearchServerlessAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultOpenSearchServerlessAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultOpenSearchServerlessAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultOpenSearchServerlessAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultOpenSearchServerlessAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultOpenSearchServerlessAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(OpenSearchServerlessClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSOpsWorks/Sources/AWSOpsWorks/OpsWorksClient.swift b/Sources/Services/AWSOpsWorks/Sources/AWSOpsWorks/OpsWorksClient.swift index 5f1174b8d31..93e1ec41e03 100644 --- a/Sources/Services/AWSOpsWorks/Sources/AWSOpsWorks/OpsWorksClient.swift +++ b/Sources/Services/AWSOpsWorks/Sources/AWSOpsWorks/OpsWorksClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class OpsWorksClient: ClientRuntime.Client { public static let clientName = "OpsWorksClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: OpsWorksClient.OpsWorksClientConfiguration let serviceName = "OpsWorks" @@ -85,52 +85,54 @@ public class OpsWorksClient: ClientRuntime.Client { } extension OpsWorksClient { + public class OpsWorksClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension OpsWorksClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: OpsWorksClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultOpsWorksAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultOpsWorksAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultOpsWorksAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultOpsWorksAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultOpsWorksAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultOpsWorksAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(OpsWorksClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSOpsWorksCM/Sources/AWSOpsWorksCM/OpsWorksCMClient.swift b/Sources/Services/AWSOpsWorksCM/Sources/AWSOpsWorksCM/OpsWorksCMClient.swift index 4021f7e753f..b65c52933f6 100644 --- a/Sources/Services/AWSOpsWorksCM/Sources/AWSOpsWorksCM/OpsWorksCMClient.swift +++ b/Sources/Services/AWSOpsWorksCM/Sources/AWSOpsWorksCM/OpsWorksCMClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class OpsWorksCMClient: ClientRuntime.Client { public static let clientName = "OpsWorksCMClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: OpsWorksCMClient.OpsWorksCMClientConfiguration let serviceName = "OpsWorksCM" @@ -85,52 +85,54 @@ public class OpsWorksCMClient: ClientRuntime.Client { } extension OpsWorksCMClient { + public class OpsWorksCMClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension OpsWorksCMClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: OpsWorksCMClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultOpsWorksCMAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultOpsWorksCMAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultOpsWorksCMAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultOpsWorksCMAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultOpsWorksCMAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultOpsWorksCMAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(OpsWorksCMClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSOrganizations/Sources/AWSOrganizations/OrganizationsClient.swift b/Sources/Services/AWSOrganizations/Sources/AWSOrganizations/OrganizationsClient.swift index 602e3750575..c7253af3b9c 100644 --- a/Sources/Services/AWSOrganizations/Sources/AWSOrganizations/OrganizationsClient.swift +++ b/Sources/Services/AWSOrganizations/Sources/AWSOrganizations/OrganizationsClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class OrganizationsClient: ClientRuntime.Client { public static let clientName = "OrganizationsClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: OrganizationsClient.OrganizationsClientConfiguration let serviceName = "Organizations" @@ -85,52 +85,54 @@ public class OrganizationsClient: ClientRuntime.Client { } extension OrganizationsClient { + public class OrganizationsClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension OrganizationsClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: OrganizationsClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultOrganizationsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultOrganizationsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultOrganizationsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultOrganizationsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultOrganizationsAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultOrganizationsAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(OrganizationsClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSOutposts/Sources/AWSOutposts/OutpostsClient.swift b/Sources/Services/AWSOutposts/Sources/AWSOutposts/OutpostsClient.swift index 15dedd48adb..c512cf5b397 100644 --- a/Sources/Services/AWSOutposts/Sources/AWSOutposts/OutpostsClient.swift +++ b/Sources/Services/AWSOutposts/Sources/AWSOutposts/OutpostsClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class OutpostsClient: ClientRuntime.Client { public static let clientName = "OutpostsClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: OutpostsClient.OutpostsClientConfiguration let serviceName = "Outposts" @@ -86,52 +86,54 @@ public class OutpostsClient: ClientRuntime.Client { } extension OutpostsClient { + public class OutpostsClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension OutpostsClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: OutpostsClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultOutpostsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultOutpostsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultOutpostsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultOutpostsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultOutpostsAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultOutpostsAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(OutpostsClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSPCS/Sources/AWSPCS/PCSClient.swift b/Sources/Services/AWSPCS/Sources/AWSPCS/PCSClient.swift index 3ae815a4c1a..3f525c18ea6 100644 --- a/Sources/Services/AWSPCS/Sources/AWSPCS/PCSClient.swift +++ b/Sources/Services/AWSPCS/Sources/AWSPCS/PCSClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class PCSClient: ClientRuntime.Client { public static let clientName = "PCSClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: PCSClient.PCSClientConfiguration let serviceName = "PCS" @@ -86,52 +86,54 @@ public class PCSClient: ClientRuntime.Client { } extension PCSClient { + public class PCSClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension PCSClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: PCSClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultPCSAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultPCSAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultPCSAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultPCSAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultPCSAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultPCSAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(PCSClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSPI/Sources/AWSPI/PIClient.swift b/Sources/Services/AWSPI/Sources/AWSPI/PIClient.swift index 40d80398d55..6f922416330 100644 --- a/Sources/Services/AWSPI/Sources/AWSPI/PIClient.swift +++ b/Sources/Services/AWSPI/Sources/AWSPI/PIClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class PIClient: ClientRuntime.Client { public static let clientName = "PIClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: PIClient.PIClientConfiguration let serviceName = "PI" @@ -86,52 +86,54 @@ public class PIClient: ClientRuntime.Client { } extension PIClient { + public class PIClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension PIClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: PIClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultPIAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultPIAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultPIAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultPIAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultPIAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultPIAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(PIClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSPanorama/Sources/AWSPanorama/PanoramaClient.swift b/Sources/Services/AWSPanorama/Sources/AWSPanorama/PanoramaClient.swift index 0ba54247a51..2c7ebda0add 100644 --- a/Sources/Services/AWSPanorama/Sources/AWSPanorama/PanoramaClient.swift +++ b/Sources/Services/AWSPanorama/Sources/AWSPanorama/PanoramaClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class PanoramaClient: ClientRuntime.Client { public static let clientName = "PanoramaClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: PanoramaClient.PanoramaClientConfiguration let serviceName = "Panorama" @@ -86,52 +86,54 @@ public class PanoramaClient: ClientRuntime.Client { } extension PanoramaClient { + public class PanoramaClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension PanoramaClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: PanoramaClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultPanoramaAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultPanoramaAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultPanoramaAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultPanoramaAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultPanoramaAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultPanoramaAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(PanoramaClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSPartnerCentralSelling/Sources/AWSPartnerCentralSelling/PartnerCentralSellingClient.swift b/Sources/Services/AWSPartnerCentralSelling/Sources/AWSPartnerCentralSelling/PartnerCentralSellingClient.swift index ff7ee6bb151..2a96c3b16f7 100644 --- a/Sources/Services/AWSPartnerCentralSelling/Sources/AWSPartnerCentralSelling/PartnerCentralSellingClient.swift +++ b/Sources/Services/AWSPartnerCentralSelling/Sources/AWSPartnerCentralSelling/PartnerCentralSellingClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class PartnerCentralSellingClient: ClientRuntime.Client { public static let clientName = "PartnerCentralSellingClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: PartnerCentralSellingClient.PartnerCentralSellingClientConfiguration let serviceName = "PartnerCentral Selling" @@ -87,52 +87,54 @@ public class PartnerCentralSellingClient: ClientRuntime.Client { } extension PartnerCentralSellingClient { + public class PartnerCentralSellingClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension PartnerCentralSellingClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: PartnerCentralSellingClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultPartnerCentralSellingAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultPartnerCentralSellingAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultPartnerCentralSellingAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultPartnerCentralSellingAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultPartnerCentralSellingAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultPartnerCentralSellingAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(PartnerCentralSellingClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSPaymentCryptography/Sources/AWSPaymentCryptography/PaymentCryptographyClient.swift b/Sources/Services/AWSPaymentCryptography/Sources/AWSPaymentCryptography/PaymentCryptographyClient.swift index ab85256da50..5ece765c009 100644 --- a/Sources/Services/AWSPaymentCryptography/Sources/AWSPaymentCryptography/PaymentCryptographyClient.swift +++ b/Sources/Services/AWSPaymentCryptography/Sources/AWSPaymentCryptography/PaymentCryptographyClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class PaymentCryptographyClient: ClientRuntime.Client { public static let clientName = "PaymentCryptographyClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: PaymentCryptographyClient.PaymentCryptographyClientConfiguration let serviceName = "Payment Cryptography" @@ -86,52 +86,54 @@ public class PaymentCryptographyClient: ClientRuntime.Client { } extension PaymentCryptographyClient { + public class PaymentCryptographyClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension PaymentCryptographyClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: PaymentCryptographyClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultPaymentCryptographyAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultPaymentCryptographyAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultPaymentCryptographyAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultPaymentCryptographyAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultPaymentCryptographyAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultPaymentCryptographyAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(PaymentCryptographyClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSPaymentCryptographyData/Sources/AWSPaymentCryptographyData/PaymentCryptographyDataClient.swift b/Sources/Services/AWSPaymentCryptographyData/Sources/AWSPaymentCryptographyData/PaymentCryptographyDataClient.swift index 5beaf58b623..b537a7d2a8e 100644 --- a/Sources/Services/AWSPaymentCryptographyData/Sources/AWSPaymentCryptographyData/PaymentCryptographyDataClient.swift +++ b/Sources/Services/AWSPaymentCryptographyData/Sources/AWSPaymentCryptographyData/PaymentCryptographyDataClient.swift @@ -62,7 +62,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class PaymentCryptographyDataClient: ClientRuntime.Client { public static let clientName = "PaymentCryptographyDataClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: PaymentCryptographyDataClient.PaymentCryptographyDataClientConfiguration let serviceName = "Payment Cryptography Data" @@ -84,52 +84,54 @@ public class PaymentCryptographyDataClient: ClientRuntime.Client { } extension PaymentCryptographyDataClient { + public class PaymentCryptographyDataClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -154,25 +156,158 @@ extension PaymentCryptographyDataClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: PaymentCryptographyDataClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultPaymentCryptographyDataAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultPaymentCryptographyDataAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultPaymentCryptographyDataAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultPaymentCryptographyDataAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultPaymentCryptographyDataAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultPaymentCryptographyDataAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(PaymentCryptographyDataClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSPcaConnectorAd/Sources/AWSPcaConnectorAd/PcaConnectorAdClient.swift b/Sources/Services/AWSPcaConnectorAd/Sources/AWSPcaConnectorAd/PcaConnectorAdClient.swift index 9374d263622..f0101715667 100644 --- a/Sources/Services/AWSPcaConnectorAd/Sources/AWSPcaConnectorAd/PcaConnectorAdClient.swift +++ b/Sources/Services/AWSPcaConnectorAd/Sources/AWSPcaConnectorAd/PcaConnectorAdClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class PcaConnectorAdClient: ClientRuntime.Client { public static let clientName = "PcaConnectorAdClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: PcaConnectorAdClient.PcaConnectorAdClientConfiguration let serviceName = "Pca Connector Ad" @@ -86,52 +86,54 @@ public class PcaConnectorAdClient: ClientRuntime.Client { } extension PcaConnectorAdClient { + public class PcaConnectorAdClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension PcaConnectorAdClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: PcaConnectorAdClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultPcaConnectorAdAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultPcaConnectorAdAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultPcaConnectorAdAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultPcaConnectorAdAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultPcaConnectorAdAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultPcaConnectorAdAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(PcaConnectorAdClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSPcaConnectorScep/Sources/AWSPcaConnectorScep/PcaConnectorScepClient.swift b/Sources/Services/AWSPcaConnectorScep/Sources/AWSPcaConnectorScep/PcaConnectorScepClient.swift index 693b36f0e27..319fee1873a 100644 --- a/Sources/Services/AWSPcaConnectorScep/Sources/AWSPcaConnectorScep/PcaConnectorScepClient.swift +++ b/Sources/Services/AWSPcaConnectorScep/Sources/AWSPcaConnectorScep/PcaConnectorScepClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class PcaConnectorScepClient: ClientRuntime.Client { public static let clientName = "PcaConnectorScepClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: PcaConnectorScepClient.PcaConnectorScepClientConfiguration let serviceName = "Pca Connector Scep" @@ -86,52 +86,54 @@ public class PcaConnectorScepClient: ClientRuntime.Client { } extension PcaConnectorScepClient { + public class PcaConnectorScepClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension PcaConnectorScepClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: PcaConnectorScepClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultPcaConnectorScepAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultPcaConnectorScepAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultPcaConnectorScepAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultPcaConnectorScepAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultPcaConnectorScepAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultPcaConnectorScepAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(PcaConnectorScepClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSPersonalize/Sources/AWSPersonalize/PersonalizeClient.swift b/Sources/Services/AWSPersonalize/Sources/AWSPersonalize/PersonalizeClient.swift index fb4b841771d..6f86db70d0b 100644 --- a/Sources/Services/AWSPersonalize/Sources/AWSPersonalize/PersonalizeClient.swift +++ b/Sources/Services/AWSPersonalize/Sources/AWSPersonalize/PersonalizeClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class PersonalizeClient: ClientRuntime.Client { public static let clientName = "PersonalizeClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: PersonalizeClient.PersonalizeClientConfiguration let serviceName = "Personalize" @@ -85,52 +85,54 @@ public class PersonalizeClient: ClientRuntime.Client { } extension PersonalizeClient { + public class PersonalizeClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension PersonalizeClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: PersonalizeClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultPersonalizeAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultPersonalizeAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultPersonalizeAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultPersonalizeAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultPersonalizeAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultPersonalizeAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(PersonalizeClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSPersonalizeEvents/Sources/AWSPersonalizeEvents/PersonalizeEventsClient.swift b/Sources/Services/AWSPersonalizeEvents/Sources/AWSPersonalizeEvents/PersonalizeEventsClient.swift index ccd70c7b010..f54d5352aa8 100644 --- a/Sources/Services/AWSPersonalizeEvents/Sources/AWSPersonalizeEvents/PersonalizeEventsClient.swift +++ b/Sources/Services/AWSPersonalizeEvents/Sources/AWSPersonalizeEvents/PersonalizeEventsClient.swift @@ -62,7 +62,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class PersonalizeEventsClient: ClientRuntime.Client { public static let clientName = "PersonalizeEventsClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: PersonalizeEventsClient.PersonalizeEventsClientConfiguration let serviceName = "Personalize Events" @@ -84,52 +84,54 @@ public class PersonalizeEventsClient: ClientRuntime.Client { } extension PersonalizeEventsClient { + public class PersonalizeEventsClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -154,25 +156,158 @@ extension PersonalizeEventsClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: PersonalizeEventsClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultPersonalizeEventsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultPersonalizeEventsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultPersonalizeEventsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultPersonalizeEventsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultPersonalizeEventsAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultPersonalizeEventsAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(PersonalizeEventsClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSPersonalizeRuntime/Sources/AWSPersonalizeRuntime/PersonalizeRuntimeClient.swift b/Sources/Services/AWSPersonalizeRuntime/Sources/AWSPersonalizeRuntime/PersonalizeRuntimeClient.swift index bf1154b5368..8126453f705 100644 --- a/Sources/Services/AWSPersonalizeRuntime/Sources/AWSPersonalizeRuntime/PersonalizeRuntimeClient.swift +++ b/Sources/Services/AWSPersonalizeRuntime/Sources/AWSPersonalizeRuntime/PersonalizeRuntimeClient.swift @@ -62,7 +62,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class PersonalizeRuntimeClient: ClientRuntime.Client { public static let clientName = "PersonalizeRuntimeClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: PersonalizeRuntimeClient.PersonalizeRuntimeClientConfiguration let serviceName = "Personalize Runtime" @@ -84,52 +84,54 @@ public class PersonalizeRuntimeClient: ClientRuntime.Client { } extension PersonalizeRuntimeClient { + public class PersonalizeRuntimeClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -154,25 +156,158 @@ extension PersonalizeRuntimeClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: PersonalizeRuntimeClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultPersonalizeRuntimeAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultPersonalizeRuntimeAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultPersonalizeRuntimeAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultPersonalizeRuntimeAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultPersonalizeRuntimeAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultPersonalizeRuntimeAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(PersonalizeRuntimeClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSPinpoint/Sources/AWSPinpoint/PinpointClient.swift b/Sources/Services/AWSPinpoint/Sources/AWSPinpoint/PinpointClient.swift index c99f0cb0756..53a9412095b 100644 --- a/Sources/Services/AWSPinpoint/Sources/AWSPinpoint/PinpointClient.swift +++ b/Sources/Services/AWSPinpoint/Sources/AWSPinpoint/PinpointClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class PinpointClient: ClientRuntime.Client { public static let clientName = "PinpointClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: PinpointClient.PinpointClientConfiguration let serviceName = "Pinpoint" @@ -86,52 +86,54 @@ public class PinpointClient: ClientRuntime.Client { } extension PinpointClient { + public class PinpointClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension PinpointClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: PinpointClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultPinpointAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultPinpointAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultPinpointAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultPinpointAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultPinpointAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultPinpointAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(PinpointClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSPinpointEmail/Sources/AWSPinpointEmail/PinpointEmailClient.swift b/Sources/Services/AWSPinpointEmail/Sources/AWSPinpointEmail/PinpointEmailClient.swift index de2e2eb1781..a0b24639c2e 100644 --- a/Sources/Services/AWSPinpointEmail/Sources/AWSPinpointEmail/PinpointEmailClient.swift +++ b/Sources/Services/AWSPinpointEmail/Sources/AWSPinpointEmail/PinpointEmailClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class PinpointEmailClient: ClientRuntime.Client { public static let clientName = "PinpointEmailClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: PinpointEmailClient.PinpointEmailClientConfiguration let serviceName = "Pinpoint Email" @@ -86,52 +86,54 @@ public class PinpointEmailClient: ClientRuntime.Client { } extension PinpointEmailClient { + public class PinpointEmailClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension PinpointEmailClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: PinpointEmailClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultPinpointEmailAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultPinpointEmailAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultPinpointEmailAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultPinpointEmailAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultPinpointEmailAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultPinpointEmailAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(PinpointEmailClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSPinpointSMSVoice/Sources/AWSPinpointSMSVoice/PinpointSMSVoiceClient.swift b/Sources/Services/AWSPinpointSMSVoice/Sources/AWSPinpointSMSVoice/PinpointSMSVoiceClient.swift index d2cce794f1d..4f559a9a3d4 100644 --- a/Sources/Services/AWSPinpointSMSVoice/Sources/AWSPinpointSMSVoice/PinpointSMSVoiceClient.swift +++ b/Sources/Services/AWSPinpointSMSVoice/Sources/AWSPinpointSMSVoice/PinpointSMSVoiceClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class PinpointSMSVoiceClient: ClientRuntime.Client { public static let clientName = "PinpointSMSVoiceClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: PinpointSMSVoiceClient.PinpointSMSVoiceClientConfiguration let serviceName = "Pinpoint SMS Voice" @@ -85,52 +85,54 @@ public class PinpointSMSVoiceClient: ClientRuntime.Client { } extension PinpointSMSVoiceClient { + public class PinpointSMSVoiceClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension PinpointSMSVoiceClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: PinpointSMSVoiceClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultPinpointSMSVoiceAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultPinpointSMSVoiceAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultPinpointSMSVoiceAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultPinpointSMSVoiceAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultPinpointSMSVoiceAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultPinpointSMSVoiceAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(PinpointSMSVoiceClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSPinpointSMSVoiceV2/Sources/AWSPinpointSMSVoiceV2/PinpointSMSVoiceV2Client.swift b/Sources/Services/AWSPinpointSMSVoiceV2/Sources/AWSPinpointSMSVoiceV2/PinpointSMSVoiceV2Client.swift index b52ebc1c1b1..30c70ba7282 100644 --- a/Sources/Services/AWSPinpointSMSVoiceV2/Sources/AWSPinpointSMSVoiceV2/PinpointSMSVoiceV2Client.swift +++ b/Sources/Services/AWSPinpointSMSVoiceV2/Sources/AWSPinpointSMSVoiceV2/PinpointSMSVoiceV2Client.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class PinpointSMSVoiceV2Client: ClientRuntime.Client { public static let clientName = "PinpointSMSVoiceV2Client" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: PinpointSMSVoiceV2Client.PinpointSMSVoiceV2ClientConfiguration let serviceName = "Pinpoint SMS Voice V2" @@ -87,52 +87,54 @@ public class PinpointSMSVoiceV2Client: ClientRuntime.Client { } extension PinpointSMSVoiceV2Client { + public class PinpointSMSVoiceV2ClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension PinpointSMSVoiceV2Client { self.logger = telemetryProvider.loggerProvider.getLogger(name: PinpointSMSVoiceV2Client.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultPinpointSMSVoiceV2AuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultPinpointSMSVoiceV2AuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultPinpointSMSVoiceV2AuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultPinpointSMSVoiceV2AuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultPinpointSMSVoiceV2AuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultPinpointSMSVoiceV2AuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(PinpointSMSVoiceV2Client.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSPipes/Sources/AWSPipes/PipesClient.swift b/Sources/Services/AWSPipes/Sources/AWSPipes/PipesClient.swift index 97a0b901940..2d0a5a77d3d 100644 --- a/Sources/Services/AWSPipes/Sources/AWSPipes/PipesClient.swift +++ b/Sources/Services/AWSPipes/Sources/AWSPipes/PipesClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class PipesClient: ClientRuntime.Client { public static let clientName = "PipesClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: PipesClient.PipesClientConfiguration let serviceName = "Pipes" @@ -86,52 +86,54 @@ public class PipesClient: ClientRuntime.Client { } extension PipesClient { + public class PipesClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension PipesClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: PipesClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultPipesAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultPipesAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultPipesAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultPipesAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultPipesAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultPipesAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(PipesClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSPolly/Sources/AWSPolly/PollyClient.swift b/Sources/Services/AWSPolly/Sources/AWSPolly/PollyClient.swift index 55324cc0017..8198c860edc 100644 --- a/Sources/Services/AWSPolly/Sources/AWSPolly/PollyClient.swift +++ b/Sources/Services/AWSPolly/Sources/AWSPolly/PollyClient.swift @@ -69,7 +69,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class PollyClient: ClientRuntime.Client { public static let clientName = "PollyClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: PollyClient.PollyClientConfiguration let serviceName = "Polly" @@ -91,52 +91,54 @@ public class PollyClient: ClientRuntime.Client { } extension PollyClient { + public class PollyClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -161,25 +163,158 @@ extension PollyClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: PollyClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultPollyAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultPollyAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultPollyAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultPollyAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultPollyAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultPollyAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(PollyClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSPricing/Sources/AWSPricing/PricingClient.swift b/Sources/Services/AWSPricing/Sources/AWSPricing/PricingClient.swift index 69b411a25c4..d61d1873ab1 100644 --- a/Sources/Services/AWSPricing/Sources/AWSPricing/PricingClient.swift +++ b/Sources/Services/AWSPricing/Sources/AWSPricing/PricingClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class PricingClient: ClientRuntime.Client { public static let clientName = "PricingClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: PricingClient.PricingClientConfiguration let serviceName = "Pricing" @@ -86,52 +86,54 @@ public class PricingClient: ClientRuntime.Client { } extension PricingClient { + public class PricingClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension PricingClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: PricingClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultPricingAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultPricingAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultPricingAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultPricingAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultPricingAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultPricingAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(PricingClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSPrivateNetworks/Sources/AWSPrivateNetworks/PrivateNetworksClient.swift b/Sources/Services/AWSPrivateNetworks/Sources/AWSPrivateNetworks/PrivateNetworksClient.swift index 0874a57ca1c..8b79698e8c5 100644 --- a/Sources/Services/AWSPrivateNetworks/Sources/AWSPrivateNetworks/PrivateNetworksClient.swift +++ b/Sources/Services/AWSPrivateNetworks/Sources/AWSPrivateNetworks/PrivateNetworksClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class PrivateNetworksClient: ClientRuntime.Client { public static let clientName = "PrivateNetworksClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: PrivateNetworksClient.PrivateNetworksClientConfiguration let serviceName = "PrivateNetworks" @@ -85,52 +85,54 @@ public class PrivateNetworksClient: ClientRuntime.Client { } extension PrivateNetworksClient { + public class PrivateNetworksClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension PrivateNetworksClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: PrivateNetworksClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultPrivateNetworksAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultPrivateNetworksAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultPrivateNetworksAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultPrivateNetworksAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultPrivateNetworksAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultPrivateNetworksAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(PrivateNetworksClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSProton/Sources/AWSProton/ProtonClient.swift b/Sources/Services/AWSProton/Sources/AWSProton/ProtonClient.swift index f7fc929e022..4ec4c519eb8 100644 --- a/Sources/Services/AWSProton/Sources/AWSProton/ProtonClient.swift +++ b/Sources/Services/AWSProton/Sources/AWSProton/ProtonClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ProtonClient: ClientRuntime.Client { public static let clientName = "ProtonClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ProtonClient.ProtonClientConfiguration let serviceName = "Proton" @@ -86,52 +86,54 @@ public class ProtonClient: ClientRuntime.Client { } extension ProtonClient { + public class ProtonClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension ProtonClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: ProtonClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultProtonAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultProtonAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultProtonAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultProtonAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultProtonAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultProtonAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ProtonClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSQApps/Sources/AWSQApps/QAppsClient.swift b/Sources/Services/AWSQApps/Sources/AWSQApps/QAppsClient.swift index 5aa05502c4c..543b87ef58f 100644 --- a/Sources/Services/AWSQApps/Sources/AWSQApps/QAppsClient.swift +++ b/Sources/Services/AWSQApps/Sources/AWSQApps/QAppsClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class QAppsClient: ClientRuntime.Client { public static let clientName = "QAppsClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: QAppsClient.QAppsClientConfiguration let serviceName = "QApps" @@ -87,52 +87,54 @@ public class QAppsClient: ClientRuntime.Client { } extension QAppsClient { + public class QAppsClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension QAppsClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: QAppsClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultQAppsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultQAppsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultQAppsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultQAppsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultQAppsAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultQAppsAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(QAppsClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSQBusiness/Sources/AWSQBusiness/QBusinessClient.swift b/Sources/Services/AWSQBusiness/Sources/AWSQBusiness/QBusinessClient.swift index e3677a7b7e7..428aaafcd6c 100644 --- a/Sources/Services/AWSQBusiness/Sources/AWSQBusiness/QBusinessClient.swift +++ b/Sources/Services/AWSQBusiness/Sources/AWSQBusiness/QBusinessClient.swift @@ -68,7 +68,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class QBusinessClient: ClientRuntime.Client { public static let clientName = "QBusinessClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: QBusinessClient.QBusinessClientConfiguration let serviceName = "QBusiness" @@ -90,52 +90,54 @@ public class QBusinessClient: ClientRuntime.Client { } extension QBusinessClient { + public class QBusinessClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -160,25 +162,158 @@ extension QBusinessClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: QBusinessClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultQBusinessAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultQBusinessAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultQBusinessAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultQBusinessAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultQBusinessAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultQBusinessAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(QBusinessClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSQConnect/Sources/AWSQConnect/QConnectClient.swift b/Sources/Services/AWSQConnect/Sources/AWSQConnect/QConnectClient.swift index efaa8769600..2e7c6aea674 100644 --- a/Sources/Services/AWSQConnect/Sources/AWSQConnect/QConnectClient.swift +++ b/Sources/Services/AWSQConnect/Sources/AWSQConnect/QConnectClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class QConnectClient: ClientRuntime.Client { public static let clientName = "QConnectClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: QConnectClient.QConnectClientConfiguration let serviceName = "QConnect" @@ -87,52 +87,54 @@ public class QConnectClient: ClientRuntime.Client { } extension QConnectClient { + public class QConnectClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension QConnectClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: QConnectClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultQConnectAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultQConnectAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultQConnectAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultQConnectAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultQConnectAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultQConnectAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(QConnectClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSQLDB/Sources/AWSQLDB/QLDBClient.swift b/Sources/Services/AWSQLDB/Sources/AWSQLDB/QLDBClient.swift index cf9200dee7a..ce5049c8cad 100644 --- a/Sources/Services/AWSQLDB/Sources/AWSQLDB/QLDBClient.swift +++ b/Sources/Services/AWSQLDB/Sources/AWSQLDB/QLDBClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class QLDBClient: ClientRuntime.Client { public static let clientName = "QLDBClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: QLDBClient.QLDBClientConfiguration let serviceName = "QLDB" @@ -86,52 +86,54 @@ public class QLDBClient: ClientRuntime.Client { } extension QLDBClient { + public class QLDBClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension QLDBClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: QLDBClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultQLDBAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultQLDBAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultQLDBAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultQLDBAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultQLDBAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultQLDBAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(QLDBClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSQLDBSession/Sources/AWSQLDBSession/QLDBSessionClient.swift b/Sources/Services/AWSQLDBSession/Sources/AWSQLDBSession/QLDBSessionClient.swift index aab9d751b41..08d7ad0ff45 100644 --- a/Sources/Services/AWSQLDBSession/Sources/AWSQLDBSession/QLDBSessionClient.swift +++ b/Sources/Services/AWSQLDBSession/Sources/AWSQLDBSession/QLDBSessionClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class QLDBSessionClient: ClientRuntime.Client { public static let clientName = "QLDBSessionClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: QLDBSessionClient.QLDBSessionClientConfiguration let serviceName = "QLDB Session" @@ -85,52 +85,54 @@ public class QLDBSessionClient: ClientRuntime.Client { } extension QLDBSessionClient { + public class QLDBSessionClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension QLDBSessionClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: QLDBSessionClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultQLDBSessionAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultQLDBSessionAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultQLDBSessionAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultQLDBSessionAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultQLDBSessionAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultQLDBSessionAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(QLDBSessionClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSQuickSight/Sources/AWSQuickSight/QuickSightClient.swift b/Sources/Services/AWSQuickSight/Sources/AWSQuickSight/QuickSightClient.swift index 7a35f99560d..d988b92be04 100644 --- a/Sources/Services/AWSQuickSight/Sources/AWSQuickSight/QuickSightClient.swift +++ b/Sources/Services/AWSQuickSight/Sources/AWSQuickSight/QuickSightClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class QuickSightClient: ClientRuntime.Client { public static let clientName = "QuickSightClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: QuickSightClient.QuickSightClientConfiguration let serviceName = "QuickSight" @@ -86,52 +86,54 @@ public class QuickSightClient: ClientRuntime.Client { } extension QuickSightClient { + public class QuickSightClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension QuickSightClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: QuickSightClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultQuickSightAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultQuickSightAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultQuickSightAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultQuickSightAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultQuickSightAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultQuickSightAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(QuickSightClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSRAM/Sources/AWSRAM/RAMClient.swift b/Sources/Services/AWSRAM/Sources/AWSRAM/RAMClient.swift index 9ec1c978267..2164b2c7c78 100644 --- a/Sources/Services/AWSRAM/Sources/AWSRAM/RAMClient.swift +++ b/Sources/Services/AWSRAM/Sources/AWSRAM/RAMClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class RAMClient: ClientRuntime.Client { public static let clientName = "RAMClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: RAMClient.RAMClientConfiguration let serviceName = "RAM" @@ -85,52 +85,54 @@ public class RAMClient: ClientRuntime.Client { } extension RAMClient { + public class RAMClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension RAMClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: RAMClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultRAMAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultRAMAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultRAMAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultRAMAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultRAMAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultRAMAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(RAMClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSRDS/Sources/AWSRDS/RDSClient.swift b/Sources/Services/AWSRDS/Sources/AWSRDS/RDSClient.swift index 0b61fc70071..d10eb371a02 100644 --- a/Sources/Services/AWSRDS/Sources/AWSRDS/RDSClient.swift +++ b/Sources/Services/AWSRDS/Sources/AWSRDS/RDSClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class RDSClient: ClientRuntime.Client { public static let clientName = "RDSClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: RDSClient.RDSClientConfiguration let serviceName = "RDS" @@ -85,52 +85,54 @@ public class RDSClient: ClientRuntime.Client { } extension RDSClient { + public class RDSClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension RDSClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: RDSClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultRDSAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultRDSAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultRDSAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultRDSAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultRDSAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultRDSAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(RDSClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSRDSData/Sources/AWSRDSData/RDSDataClient.swift b/Sources/Services/AWSRDSData/Sources/AWSRDSData/RDSDataClient.swift index f8b2e93d4de..d38c3aed1be 100644 --- a/Sources/Services/AWSRDSData/Sources/AWSRDSData/RDSDataClient.swift +++ b/Sources/Services/AWSRDSData/Sources/AWSRDSData/RDSDataClient.swift @@ -62,7 +62,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class RDSDataClient: ClientRuntime.Client { public static let clientName = "RDSDataClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: RDSDataClient.RDSDataClientConfiguration let serviceName = "RDS Data" @@ -84,52 +84,54 @@ public class RDSDataClient: ClientRuntime.Client { } extension RDSDataClient { + public class RDSDataClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -154,25 +156,158 @@ extension RDSDataClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: RDSDataClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultRDSDataAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultRDSDataAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultRDSDataAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultRDSDataAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultRDSDataAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultRDSDataAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(RDSDataClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSRUM/Sources/AWSRUM/RUMClient.swift b/Sources/Services/AWSRUM/Sources/AWSRUM/RUMClient.swift index f643fd22d6f..5643af778fa 100644 --- a/Sources/Services/AWSRUM/Sources/AWSRUM/RUMClient.swift +++ b/Sources/Services/AWSRUM/Sources/AWSRUM/RUMClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class RUMClient: ClientRuntime.Client { public static let clientName = "RUMClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: RUMClient.RUMClientConfiguration let serviceName = "RUM" @@ -85,52 +85,54 @@ public class RUMClient: ClientRuntime.Client { } extension RUMClient { + public class RUMClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension RUMClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: RUMClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultRUMAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultRUMAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultRUMAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultRUMAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultRUMAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultRUMAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(RUMClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSRbin/Sources/AWSRbin/RbinClient.swift b/Sources/Services/AWSRbin/Sources/AWSRbin/RbinClient.swift index fb501173ad8..e9646725588 100644 --- a/Sources/Services/AWSRbin/Sources/AWSRbin/RbinClient.swift +++ b/Sources/Services/AWSRbin/Sources/AWSRbin/RbinClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class RbinClient: ClientRuntime.Client { public static let clientName = "RbinClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: RbinClient.RbinClientConfiguration let serviceName = "rbin" @@ -86,52 +86,54 @@ public class RbinClient: ClientRuntime.Client { } extension RbinClient { + public class RbinClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension RbinClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: RbinClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultRbinAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultRbinAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultRbinAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultRbinAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultRbinAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultRbinAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(RbinClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSRedshift/Sources/AWSRedshift/RedshiftClient.swift b/Sources/Services/AWSRedshift/Sources/AWSRedshift/RedshiftClient.swift index 2a9f706b464..b7bc2833eb8 100644 --- a/Sources/Services/AWSRedshift/Sources/AWSRedshift/RedshiftClient.swift +++ b/Sources/Services/AWSRedshift/Sources/AWSRedshift/RedshiftClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class RedshiftClient: ClientRuntime.Client { public static let clientName = "RedshiftClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: RedshiftClient.RedshiftClientConfiguration let serviceName = "Redshift" @@ -85,52 +85,54 @@ public class RedshiftClient: ClientRuntime.Client { } extension RedshiftClient { + public class RedshiftClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension RedshiftClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: RedshiftClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultRedshiftAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultRedshiftAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultRedshiftAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultRedshiftAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultRedshiftAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultRedshiftAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(RedshiftClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSRedshiftData/Sources/AWSRedshiftData/RedshiftDataClient.swift b/Sources/Services/AWSRedshiftData/Sources/AWSRedshiftData/RedshiftDataClient.swift index d5ae10506c7..0c8139bcf59 100644 --- a/Sources/Services/AWSRedshiftData/Sources/AWSRedshiftData/RedshiftDataClient.swift +++ b/Sources/Services/AWSRedshiftData/Sources/AWSRedshiftData/RedshiftDataClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class RedshiftDataClient: ClientRuntime.Client { public static let clientName = "RedshiftDataClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: RedshiftDataClient.RedshiftDataClientConfiguration let serviceName = "Redshift Data" @@ -87,52 +87,54 @@ public class RedshiftDataClient: ClientRuntime.Client { } extension RedshiftDataClient { + public class RedshiftDataClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension RedshiftDataClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: RedshiftDataClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultRedshiftDataAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultRedshiftDataAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultRedshiftDataAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultRedshiftDataAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultRedshiftDataAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultRedshiftDataAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(RedshiftDataClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSRedshiftServerless/Sources/AWSRedshiftServerless/RedshiftServerlessClient.swift b/Sources/Services/AWSRedshiftServerless/Sources/AWSRedshiftServerless/RedshiftServerlessClient.swift index 47d5f034c10..072321d8ed7 100644 --- a/Sources/Services/AWSRedshiftServerless/Sources/AWSRedshiftServerless/RedshiftServerlessClient.swift +++ b/Sources/Services/AWSRedshiftServerless/Sources/AWSRedshiftServerless/RedshiftServerlessClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class RedshiftServerlessClient: ClientRuntime.Client { public static let clientName = "RedshiftServerlessClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: RedshiftServerlessClient.RedshiftServerlessClientConfiguration let serviceName = "Redshift Serverless" @@ -86,52 +86,54 @@ public class RedshiftServerlessClient: ClientRuntime.Client { } extension RedshiftServerlessClient { + public class RedshiftServerlessClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension RedshiftServerlessClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: RedshiftServerlessClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultRedshiftServerlessAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultRedshiftServerlessAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultRedshiftServerlessAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultRedshiftServerlessAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultRedshiftServerlessAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultRedshiftServerlessAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(RedshiftServerlessClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSRekognition/Sources/AWSRekognition/RekognitionClient.swift b/Sources/Services/AWSRekognition/Sources/AWSRekognition/RekognitionClient.swift index 0082d7905d8..1b0a54fdc5c 100644 --- a/Sources/Services/AWSRekognition/Sources/AWSRekognition/RekognitionClient.swift +++ b/Sources/Services/AWSRekognition/Sources/AWSRekognition/RekognitionClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class RekognitionClient: ClientRuntime.Client { public static let clientName = "RekognitionClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: RekognitionClient.RekognitionClientConfiguration let serviceName = "Rekognition" @@ -87,52 +87,54 @@ public class RekognitionClient: ClientRuntime.Client { } extension RekognitionClient { + public class RekognitionClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension RekognitionClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: RekognitionClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultRekognitionAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultRekognitionAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultRekognitionAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultRekognitionAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultRekognitionAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultRekognitionAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(RekognitionClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSRepostspace/Sources/AWSRepostspace/RepostspaceClient.swift b/Sources/Services/AWSRepostspace/Sources/AWSRepostspace/RepostspaceClient.swift index 97861f24d2d..e0b115e657f 100644 --- a/Sources/Services/AWSRepostspace/Sources/AWSRepostspace/RepostspaceClient.swift +++ b/Sources/Services/AWSRepostspace/Sources/AWSRepostspace/RepostspaceClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class RepostspaceClient: ClientRuntime.Client { public static let clientName = "RepostspaceClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: RepostspaceClient.RepostspaceClientConfiguration let serviceName = "repostspace" @@ -86,52 +86,54 @@ public class RepostspaceClient: ClientRuntime.Client { } extension RepostspaceClient { + public class RepostspaceClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension RepostspaceClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: RepostspaceClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultRepostspaceAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultRepostspaceAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultRepostspaceAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultRepostspaceAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultRepostspaceAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultRepostspaceAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(RepostspaceClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSResiliencehub/Sources/AWSResiliencehub/ResiliencehubClient.swift b/Sources/Services/AWSResiliencehub/Sources/AWSResiliencehub/ResiliencehubClient.swift index 0b51ad63291..d6fdf5dd06d 100644 --- a/Sources/Services/AWSResiliencehub/Sources/AWSResiliencehub/ResiliencehubClient.swift +++ b/Sources/Services/AWSResiliencehub/Sources/AWSResiliencehub/ResiliencehubClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ResiliencehubClient: ClientRuntime.Client { public static let clientName = "ResiliencehubClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ResiliencehubClient.ResiliencehubClientConfiguration let serviceName = "resiliencehub" @@ -87,52 +87,54 @@ public class ResiliencehubClient: ClientRuntime.Client { } extension ResiliencehubClient { + public class ResiliencehubClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension ResiliencehubClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: ResiliencehubClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultResiliencehubAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultResiliencehubAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultResiliencehubAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultResiliencehubAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultResiliencehubAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultResiliencehubAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ResiliencehubClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSResourceExplorer2/Sources/AWSResourceExplorer2/ResourceExplorer2Client.swift b/Sources/Services/AWSResourceExplorer2/Sources/AWSResourceExplorer2/ResourceExplorer2Client.swift index 85bf695e586..c0532a66d13 100644 --- a/Sources/Services/AWSResourceExplorer2/Sources/AWSResourceExplorer2/ResourceExplorer2Client.swift +++ b/Sources/Services/AWSResourceExplorer2/Sources/AWSResourceExplorer2/ResourceExplorer2Client.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ResourceExplorer2Client: ClientRuntime.Client { public static let clientName = "ResourceExplorer2Client" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ResourceExplorer2Client.ResourceExplorer2ClientConfiguration let serviceName = "Resource Explorer 2" @@ -87,52 +87,54 @@ public class ResourceExplorer2Client: ClientRuntime.Client { } extension ResourceExplorer2Client { + public class ResourceExplorer2ClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension ResourceExplorer2Client { self.logger = telemetryProvider.loggerProvider.getLogger(name: ResourceExplorer2Client.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultResourceExplorer2AuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultResourceExplorer2AuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultResourceExplorer2AuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultResourceExplorer2AuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultResourceExplorer2AuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultResourceExplorer2AuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ResourceExplorer2Client.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSResourceGroups/Sources/AWSResourceGroups/ResourceGroupsClient.swift b/Sources/Services/AWSResourceGroups/Sources/AWSResourceGroups/ResourceGroupsClient.swift index 3572a294ea7..931e527a728 100644 --- a/Sources/Services/AWSResourceGroups/Sources/AWSResourceGroups/ResourceGroupsClient.swift +++ b/Sources/Services/AWSResourceGroups/Sources/AWSResourceGroups/ResourceGroupsClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ResourceGroupsClient: ClientRuntime.Client { public static let clientName = "ResourceGroupsClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ResourceGroupsClient.ResourceGroupsClientConfiguration let serviceName = "Resource Groups" @@ -86,52 +86,54 @@ public class ResourceGroupsClient: ClientRuntime.Client { } extension ResourceGroupsClient { + public class ResourceGroupsClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension ResourceGroupsClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: ResourceGroupsClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultResourceGroupsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultResourceGroupsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultResourceGroupsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultResourceGroupsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultResourceGroupsAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultResourceGroupsAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ResourceGroupsClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSResourceGroupsTaggingAPI/Sources/AWSResourceGroupsTaggingAPI/ResourceGroupsTaggingAPIClient.swift b/Sources/Services/AWSResourceGroupsTaggingAPI/Sources/AWSResourceGroupsTaggingAPI/ResourceGroupsTaggingAPIClient.swift index 1c5d85d349e..a1b2f287c86 100644 --- a/Sources/Services/AWSResourceGroupsTaggingAPI/Sources/AWSResourceGroupsTaggingAPI/ResourceGroupsTaggingAPIClient.swift +++ b/Sources/Services/AWSResourceGroupsTaggingAPI/Sources/AWSResourceGroupsTaggingAPI/ResourceGroupsTaggingAPIClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ResourceGroupsTaggingAPIClient: ClientRuntime.Client { public static let clientName = "ResourceGroupsTaggingAPIClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ResourceGroupsTaggingAPIClient.ResourceGroupsTaggingAPIClientConfiguration let serviceName = "Resource Groups Tagging API" @@ -85,52 +85,54 @@ public class ResourceGroupsTaggingAPIClient: ClientRuntime.Client { } extension ResourceGroupsTaggingAPIClient { + public class ResourceGroupsTaggingAPIClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension ResourceGroupsTaggingAPIClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: ResourceGroupsTaggingAPIClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultResourceGroupsTaggingAPIAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultResourceGroupsTaggingAPIAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultResourceGroupsTaggingAPIAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultResourceGroupsTaggingAPIAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultResourceGroupsTaggingAPIAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultResourceGroupsTaggingAPIAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ResourceGroupsTaggingAPIClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSRoboMaker/Sources/AWSRoboMaker/RoboMakerClient.swift b/Sources/Services/AWSRoboMaker/Sources/AWSRoboMaker/RoboMakerClient.swift index edc485ec678..20fade9fe9c 100644 --- a/Sources/Services/AWSRoboMaker/Sources/AWSRoboMaker/RoboMakerClient.swift +++ b/Sources/Services/AWSRoboMaker/Sources/AWSRoboMaker/RoboMakerClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class RoboMakerClient: ClientRuntime.Client { public static let clientName = "RoboMakerClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: RoboMakerClient.RoboMakerClientConfiguration let serviceName = "RoboMaker" @@ -87,52 +87,54 @@ public class RoboMakerClient: ClientRuntime.Client { } extension RoboMakerClient { + public class RoboMakerClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension RoboMakerClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: RoboMakerClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultRoboMakerAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultRoboMakerAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultRoboMakerAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultRoboMakerAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultRoboMakerAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultRoboMakerAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(RoboMakerClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSRolesAnywhere/Sources/AWSRolesAnywhere/RolesAnywhereClient.swift b/Sources/Services/AWSRolesAnywhere/Sources/AWSRolesAnywhere/RolesAnywhereClient.swift index 5ddf2ae8e39..541eba03237 100644 --- a/Sources/Services/AWSRolesAnywhere/Sources/AWSRolesAnywhere/RolesAnywhereClient.swift +++ b/Sources/Services/AWSRolesAnywhere/Sources/AWSRolesAnywhere/RolesAnywhereClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class RolesAnywhereClient: ClientRuntime.Client { public static let clientName = "RolesAnywhereClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: RolesAnywhereClient.RolesAnywhereClientConfiguration let serviceName = "RolesAnywhere" @@ -86,52 +86,54 @@ public class RolesAnywhereClient: ClientRuntime.Client { } extension RolesAnywhereClient { + public class RolesAnywhereClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension RolesAnywhereClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: RolesAnywhereClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultRolesAnywhereAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultRolesAnywhereAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultRolesAnywhereAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultRolesAnywhereAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultRolesAnywhereAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultRolesAnywhereAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(RolesAnywhereClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSRoute53/Sources/AWSRoute53/Route53Client.swift b/Sources/Services/AWSRoute53/Sources/AWSRoute53/Route53Client.swift index c77c8156ff7..eedaa233379 100644 --- a/Sources/Services/AWSRoute53/Sources/AWSRoute53/Route53Client.swift +++ b/Sources/Services/AWSRoute53/Sources/AWSRoute53/Route53Client.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class Route53Client: ClientRuntime.Client { public static let clientName = "Route53Client" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: Route53Client.Route53ClientConfiguration let serviceName = "Route 53" @@ -86,52 +86,54 @@ public class Route53Client: ClientRuntime.Client { } extension Route53Client { + public class Route53ClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension Route53Client { self.logger = telemetryProvider.loggerProvider.getLogger(name: Route53Client.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultRoute53AuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultRoute53AuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultRoute53AuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultRoute53AuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultRoute53AuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultRoute53AuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(Route53Client.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSRoute53Domains/Sources/AWSRoute53Domains/Route53DomainsClient.swift b/Sources/Services/AWSRoute53Domains/Sources/AWSRoute53Domains/Route53DomainsClient.swift index 54bb240b869..463fb7b3c00 100644 --- a/Sources/Services/AWSRoute53Domains/Sources/AWSRoute53Domains/Route53DomainsClient.swift +++ b/Sources/Services/AWSRoute53Domains/Sources/AWSRoute53Domains/Route53DomainsClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class Route53DomainsClient: ClientRuntime.Client { public static let clientName = "Route53DomainsClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: Route53DomainsClient.Route53DomainsClientConfiguration let serviceName = "Route 53 Domains" @@ -86,52 +86,54 @@ public class Route53DomainsClient: ClientRuntime.Client { } extension Route53DomainsClient { + public class Route53DomainsClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension Route53DomainsClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: Route53DomainsClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultRoute53DomainsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultRoute53DomainsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultRoute53DomainsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultRoute53DomainsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultRoute53DomainsAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultRoute53DomainsAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(Route53DomainsClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSRoute53Profiles/Sources/AWSRoute53Profiles/Route53ProfilesClient.swift b/Sources/Services/AWSRoute53Profiles/Sources/AWSRoute53Profiles/Route53ProfilesClient.swift index db6456d9665..60ad769520e 100644 --- a/Sources/Services/AWSRoute53Profiles/Sources/AWSRoute53Profiles/Route53ProfilesClient.swift +++ b/Sources/Services/AWSRoute53Profiles/Sources/AWSRoute53Profiles/Route53ProfilesClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class Route53ProfilesClient: ClientRuntime.Client { public static let clientName = "Route53ProfilesClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: Route53ProfilesClient.Route53ProfilesClientConfiguration let serviceName = "Route53Profiles" @@ -86,52 +86,54 @@ public class Route53ProfilesClient: ClientRuntime.Client { } extension Route53ProfilesClient { + public class Route53ProfilesClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension Route53ProfilesClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: Route53ProfilesClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultRoute53ProfilesAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultRoute53ProfilesAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultRoute53ProfilesAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultRoute53ProfilesAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultRoute53ProfilesAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultRoute53ProfilesAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(Route53ProfilesClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSRoute53RecoveryCluster/Sources/AWSRoute53RecoveryCluster/Route53RecoveryClusterClient.swift b/Sources/Services/AWSRoute53RecoveryCluster/Sources/AWSRoute53RecoveryCluster/Route53RecoveryClusterClient.swift index adc61a2985e..e4d9f88fa26 100644 --- a/Sources/Services/AWSRoute53RecoveryCluster/Sources/AWSRoute53RecoveryCluster/Route53RecoveryClusterClient.swift +++ b/Sources/Services/AWSRoute53RecoveryCluster/Sources/AWSRoute53RecoveryCluster/Route53RecoveryClusterClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class Route53RecoveryClusterClient: ClientRuntime.Client { public static let clientName = "Route53RecoveryClusterClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: Route53RecoveryClusterClient.Route53RecoveryClusterClientConfiguration let serviceName = "Route53 Recovery Cluster" @@ -85,52 +85,54 @@ public class Route53RecoveryClusterClient: ClientRuntime.Client { } extension Route53RecoveryClusterClient { + public class Route53RecoveryClusterClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension Route53RecoveryClusterClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: Route53RecoveryClusterClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultRoute53RecoveryClusterAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultRoute53RecoveryClusterAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultRoute53RecoveryClusterAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultRoute53RecoveryClusterAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultRoute53RecoveryClusterAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultRoute53RecoveryClusterAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(Route53RecoveryClusterClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSRoute53RecoveryControlConfig/Sources/AWSRoute53RecoveryControlConfig/Route53RecoveryControlConfigClient.swift b/Sources/Services/AWSRoute53RecoveryControlConfig/Sources/AWSRoute53RecoveryControlConfig/Route53RecoveryControlConfigClient.swift index e5b3faf4764..1177d8bc322 100644 --- a/Sources/Services/AWSRoute53RecoveryControlConfig/Sources/AWSRoute53RecoveryControlConfig/Route53RecoveryControlConfigClient.swift +++ b/Sources/Services/AWSRoute53RecoveryControlConfig/Sources/AWSRoute53RecoveryControlConfig/Route53RecoveryControlConfigClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class Route53RecoveryControlConfigClient: ClientRuntime.Client { public static let clientName = "Route53RecoveryControlConfigClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: Route53RecoveryControlConfigClient.Route53RecoveryControlConfigClientConfiguration let serviceName = "Route53 Recovery Control Config" @@ -86,52 +86,54 @@ public class Route53RecoveryControlConfigClient: ClientRuntime.Client { } extension Route53RecoveryControlConfigClient { + public class Route53RecoveryControlConfigClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension Route53RecoveryControlConfigClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: Route53RecoveryControlConfigClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultRoute53RecoveryControlConfigAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultRoute53RecoveryControlConfigAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultRoute53RecoveryControlConfigAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultRoute53RecoveryControlConfigAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultRoute53RecoveryControlConfigAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultRoute53RecoveryControlConfigAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(Route53RecoveryControlConfigClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSRoute53RecoveryReadiness/Sources/AWSRoute53RecoveryReadiness/Route53RecoveryReadinessClient.swift b/Sources/Services/AWSRoute53RecoveryReadiness/Sources/AWSRoute53RecoveryReadiness/Route53RecoveryReadinessClient.swift index ebc7471e1db..31cb10f8bfc 100644 --- a/Sources/Services/AWSRoute53RecoveryReadiness/Sources/AWSRoute53RecoveryReadiness/Route53RecoveryReadinessClient.swift +++ b/Sources/Services/AWSRoute53RecoveryReadiness/Sources/AWSRoute53RecoveryReadiness/Route53RecoveryReadinessClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class Route53RecoveryReadinessClient: ClientRuntime.Client { public static let clientName = "Route53RecoveryReadinessClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: Route53RecoveryReadinessClient.Route53RecoveryReadinessClientConfiguration let serviceName = "Route53 Recovery Readiness" @@ -86,52 +86,54 @@ public class Route53RecoveryReadinessClient: ClientRuntime.Client { } extension Route53RecoveryReadinessClient { + public class Route53RecoveryReadinessClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension Route53RecoveryReadinessClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: Route53RecoveryReadinessClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultRoute53RecoveryReadinessAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultRoute53RecoveryReadinessAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultRoute53RecoveryReadinessAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultRoute53RecoveryReadinessAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultRoute53RecoveryReadinessAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultRoute53RecoveryReadinessAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(Route53RecoveryReadinessClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSRoute53Resolver/Sources/AWSRoute53Resolver/Route53ResolverClient.swift b/Sources/Services/AWSRoute53Resolver/Sources/AWSRoute53Resolver/Route53ResolverClient.swift index dae97c8414a..cf9382deec1 100644 --- a/Sources/Services/AWSRoute53Resolver/Sources/AWSRoute53Resolver/Route53ResolverClient.swift +++ b/Sources/Services/AWSRoute53Resolver/Sources/AWSRoute53Resolver/Route53ResolverClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class Route53ResolverClient: ClientRuntime.Client { public static let clientName = "Route53ResolverClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: Route53ResolverClient.Route53ResolverClientConfiguration let serviceName = "Route53Resolver" @@ -86,52 +86,54 @@ public class Route53ResolverClient: ClientRuntime.Client { } extension Route53ResolverClient { + public class Route53ResolverClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension Route53ResolverClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: Route53ResolverClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultRoute53ResolverAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultRoute53ResolverAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultRoute53ResolverAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultRoute53ResolverAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultRoute53ResolverAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultRoute53ResolverAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(Route53ResolverClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSS3/Sources/AWSS3/S3Client.swift b/Sources/Services/AWSS3/Sources/AWSS3/S3Client.swift index d7e6f2b67a5..52a4925f0ca 100644 --- a/Sources/Services/AWSS3/Sources/AWSS3/S3Client.swift +++ b/Sources/Services/AWSS3/Sources/AWSS3/S3Client.swift @@ -80,7 +80,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class S3Client: ClientRuntime.Client { public static let clientName = "S3Client" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: S3Client.S3ClientConfiguration let serviceName = "S3" @@ -102,64 +102,66 @@ public class S3Client: ClientRuntime.Client { } extension S3Client { + public class S3ClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var forcePathStyle: Swift.Bool? - public var useArnRegion: Swift.Bool? - public var disableMultiRegionAccessPoints: Swift.Bool? - public var accelerate: Swift.Bool? - public var disableS3ExpressSessionAuth: Swift.Bool? - public var useGlobalEndpoint: Swift.Bool? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ forcePathStyle: Swift.Bool?, _ useArnRegion: Swift.Bool?, _ disableMultiRegionAccessPoints: Swift.Bool?, _ accelerate: Swift.Bool?, _ disableS3ExpressSessionAuth: Swift.Bool?, _ useGlobalEndpoint: Swift.Bool?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ forcePathStyle: Swift.Bool?, + _ useArnRegion: Swift.Bool?, + _ disableMultiRegionAccessPoints: Swift.Bool?, + _ accelerate: Swift.Bool?, + _ disableS3ExpressSessionAuth: Swift.Bool?, + _ useGlobalEndpoint: Swift.Bool?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -190,25 +192,194 @@ extension S3Client { self.logger = telemetryProvider.loggerProvider.getLogger(name: S3Client.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, forcePathStyle: Swift.Bool? = nil, useArnRegion: Swift.Bool? = nil, disableMultiRegionAccessPoints: Swift.Bool? = nil, accelerate: Swift.Bool? = nil, disableS3ExpressSessionAuth: Swift.Bool? = nil, useGlobalEndpoint: Swift.Bool? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, forcePathStyle, useArnRegion, disableMultiRegionAccessPoints, accelerate, disableS3ExpressSessionAuth, useGlobalEndpoint, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme(), AWSSDKHTTPAuth.SigV4AAuthScheme()], authSchemeResolver ?? DefaultS3AuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, forcePathStyle: Swift.Bool? = nil, useArnRegion: Swift.Bool? = nil, disableMultiRegionAccessPoints: Swift.Bool? = nil, accelerate: Swift.Bool? = nil, disableS3ExpressSessionAuth: Swift.Bool? = nil, useGlobalEndpoint: Swift.Bool? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), forcePathStyle, useArnRegion, disableMultiRegionAccessPoints, accelerate, disableS3ExpressSessionAuth, useGlobalEndpoint, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme(), AWSSDKHTTPAuth.SigV4AAuthScheme()], authSchemeResolver ?? DefaultS3AuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + forcePathStyle: Swift.Bool? = nil, + useArnRegion: Swift.Bool? = nil, + disableMultiRegionAccessPoints: Swift.Bool? = nil, + accelerate: Swift.Bool? = nil, + disableS3ExpressSessionAuth: Swift.Bool? = nil, + useGlobalEndpoint: Swift.Bool? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + forcePathStyle, + useArnRegion, + disableMultiRegionAccessPoints, + accelerate, + disableS3ExpressSessionAuth, + useGlobalEndpoint, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme(), AWSSDKHTTPAuth.SigV4AAuthScheme()], + authSchemeResolver ?? DefaultS3AuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + forcePathStyle: Swift.Bool? = nil, + useArnRegion: Swift.Bool? = nil, + disableMultiRegionAccessPoints: Swift.Bool? = nil, + accelerate: Swift.Bool? = nil, + disableS3ExpressSessionAuth: Swift.Bool? = nil, + useGlobalEndpoint: Swift.Bool? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + forcePathStyle, + useArnRegion, + disableMultiRegionAccessPoints, + accelerate, + disableS3ExpressSessionAuth, + useGlobalEndpoint, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme(), AWSSDKHTTPAuth.SigV4AAuthScheme()], + authSchemeResolver ?? DefaultS3AuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, forcePathStyle: nil, useArnRegion: nil, disableMultiRegionAccessPoints: nil, accelerate: nil, disableS3ExpressSessionAuth: nil, useGlobalEndpoint: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, nil, nil, nil, nil, nil, nil, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme(), AWSSDKHTTPAuth.SigV4AAuthScheme()], DefaultS3AuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + forcePathStyle: nil, + useArnRegion: nil, + disableMultiRegionAccessPoints: nil, + accelerate: nil, + disableS3ExpressSessionAuth: nil, + useGlobalEndpoint: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + nil, + nil, + nil, + nil, + nil, + nil, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme(), AWSSDKHTTPAuth.SigV4AAuthScheme()], + DefaultS3AuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(S3Client.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSS3Control/Sources/AWSS3Control/S3ControlClient.swift b/Sources/Services/AWSS3Control/Sources/AWSS3Control/S3ControlClient.swift index 17be6f7d95c..da046376c53 100644 --- a/Sources/Services/AWSS3Control/Sources/AWSS3Control/S3ControlClient.swift +++ b/Sources/Services/AWSS3Control/Sources/AWSS3Control/S3ControlClient.swift @@ -68,7 +68,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class S3ControlClient: ClientRuntime.Client { public static let clientName = "S3ControlClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: S3ControlClient.S3ControlClientConfiguration let serviceName = "S3 Control" @@ -90,54 +90,56 @@ public class S3ControlClient: ClientRuntime.Client { } extension S3ControlClient { + public class S3ControlClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var useArnRegion: Swift.Bool? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ useArnRegion: Swift.Bool?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ useArnRegion: Swift.Bool?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -163,25 +165,164 @@ extension S3ControlClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: S3ControlClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, useArnRegion: Swift.Bool? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, useArnRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultS3ControlAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, useArnRegion: Swift.Bool? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), useArnRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultS3ControlAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + useArnRegion: Swift.Bool? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + useArnRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultS3ControlAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + useArnRegion: Swift.Bool? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + useArnRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultS3ControlAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, useArnRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, nil, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultS3ControlAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + useArnRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + nil, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultS3ControlAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(S3ControlClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSS3Outposts/Sources/AWSS3Outposts/S3OutpostsClient.swift b/Sources/Services/AWSS3Outposts/Sources/AWSS3Outposts/S3OutpostsClient.swift index b7c1a596884..b4e0190a4a7 100644 --- a/Sources/Services/AWSS3Outposts/Sources/AWSS3Outposts/S3OutpostsClient.swift +++ b/Sources/Services/AWSS3Outposts/Sources/AWSS3Outposts/S3OutpostsClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class S3OutpostsClient: ClientRuntime.Client { public static let clientName = "S3OutpostsClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: S3OutpostsClient.S3OutpostsClientConfiguration let serviceName = "S3Outposts" @@ -85,52 +85,54 @@ public class S3OutpostsClient: ClientRuntime.Client { } extension S3OutpostsClient { + public class S3OutpostsClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension S3OutpostsClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: S3OutpostsClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultS3OutpostsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultS3OutpostsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultS3OutpostsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultS3OutpostsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultS3OutpostsAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultS3OutpostsAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(S3OutpostsClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSS3Tables/Sources/AWSS3Tables/S3TablesClient.swift b/Sources/Services/AWSS3Tables/Sources/AWSS3Tables/S3TablesClient.swift index bde2f249d9a..0d52aab2749 100644 --- a/Sources/Services/AWSS3Tables/Sources/AWSS3Tables/S3TablesClient.swift +++ b/Sources/Services/AWSS3Tables/Sources/AWSS3Tables/S3TablesClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class S3TablesClient: ClientRuntime.Client { public static let clientName = "S3TablesClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: S3TablesClient.S3TablesClientConfiguration let serviceName = "S3Tables" @@ -86,52 +86,54 @@ public class S3TablesClient: ClientRuntime.Client { } extension S3TablesClient { + public class S3TablesClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension S3TablesClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: S3TablesClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultS3TablesAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultS3TablesAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultS3TablesAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultS3TablesAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultS3TablesAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultS3TablesAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(S3TablesClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSSES/Sources/AWSSES/SESClient.swift b/Sources/Services/AWSSES/Sources/AWSSES/SESClient.swift index e9c882a73ca..87ee0854070 100644 --- a/Sources/Services/AWSSES/Sources/AWSSES/SESClient.swift +++ b/Sources/Services/AWSSES/Sources/AWSSES/SESClient.swift @@ -62,7 +62,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class SESClient: ClientRuntime.Client { public static let clientName = "SESClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: SESClient.SESClientConfiguration let serviceName = "SES" @@ -84,52 +84,54 @@ public class SESClient: ClientRuntime.Client { } extension SESClient { + public class SESClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -154,25 +156,158 @@ extension SESClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: SESClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSESAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSESAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSESAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSESAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultSESAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultSESAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(SESClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSSESv2/Sources/AWSSESv2/SESv2Client.swift b/Sources/Services/AWSSESv2/Sources/AWSSESv2/SESv2Client.swift index 0f619f48386..81f9a7ad77c 100644 --- a/Sources/Services/AWSSESv2/Sources/AWSSESv2/SESv2Client.swift +++ b/Sources/Services/AWSSESv2/Sources/AWSSESv2/SESv2Client.swift @@ -66,7 +66,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class SESv2Client: ClientRuntime.Client { public static let clientName = "SESv2Client" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: SESv2Client.SESv2ClientConfiguration let serviceName = "SESv2" @@ -88,52 +88,54 @@ public class SESv2Client: ClientRuntime.Client { } extension SESv2Client { + public class SESv2ClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -158,25 +160,158 @@ extension SESv2Client { self.logger = telemetryProvider.loggerProvider.getLogger(name: SESv2Client.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme(), AWSSDKHTTPAuth.SigV4AAuthScheme()], authSchemeResolver ?? DefaultSESv2AuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme(), AWSSDKHTTPAuth.SigV4AAuthScheme()], authSchemeResolver ?? DefaultSESv2AuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme(), AWSSDKHTTPAuth.SigV4AAuthScheme()], + authSchemeResolver ?? DefaultSESv2AuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme(), AWSSDKHTTPAuth.SigV4AAuthScheme()], + authSchemeResolver ?? DefaultSESv2AuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme(), AWSSDKHTTPAuth.SigV4AAuthScheme()], DefaultSESv2AuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme(), AWSSDKHTTPAuth.SigV4AAuthScheme()], + DefaultSESv2AuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(SESv2Client.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSSFN/Sources/AWSSFN/SFNClient.swift b/Sources/Services/AWSSFN/Sources/AWSSFN/SFNClient.swift index 8ebb3147097..f10a75a37d4 100644 --- a/Sources/Services/AWSSFN/Sources/AWSSFN/SFNClient.swift +++ b/Sources/Services/AWSSFN/Sources/AWSSFN/SFNClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class SFNClient: ClientRuntime.Client { public static let clientName = "SFNClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: SFNClient.SFNClientConfiguration let serviceName = "SFN" @@ -87,52 +87,54 @@ public class SFNClient: ClientRuntime.Client { } extension SFNClient { + public class SFNClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension SFNClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: SFNClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSFNAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSFNAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSFNAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSFNAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultSFNAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultSFNAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(SFNClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSSMS/Sources/AWSSMS/SMSClient.swift b/Sources/Services/AWSSMS/Sources/AWSSMS/SMSClient.swift index 117df5d5729..f46289e06b6 100644 --- a/Sources/Services/AWSSMS/Sources/AWSSMS/SMSClient.swift +++ b/Sources/Services/AWSSMS/Sources/AWSSMS/SMSClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class SMSClient: ClientRuntime.Client { public static let clientName = "SMSClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: SMSClient.SMSClientConfiguration let serviceName = "SMS" @@ -86,52 +86,54 @@ public class SMSClient: ClientRuntime.Client { } extension SMSClient { + public class SMSClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension SMSClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: SMSClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSMSAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSMSAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSMSAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSMSAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultSMSAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultSMSAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(SMSClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSSNS/Sources/AWSSNS/SNSClient.swift b/Sources/Services/AWSSNS/Sources/AWSSNS/SNSClient.swift index 8de7d1d3b68..44514868c5e 100644 --- a/Sources/Services/AWSSNS/Sources/AWSSNS/SNSClient.swift +++ b/Sources/Services/AWSSNS/Sources/AWSSNS/SNSClient.swift @@ -62,7 +62,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class SNSClient: ClientRuntime.Client { public static let clientName = "SNSClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: SNSClient.SNSClientConfiguration let serviceName = "SNS" @@ -84,52 +84,54 @@ public class SNSClient: ClientRuntime.Client { } extension SNSClient { + public class SNSClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -154,25 +156,158 @@ extension SNSClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: SNSClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSNSAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSNSAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSNSAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSNSAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultSNSAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultSNSAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(SNSClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSSQS/Sources/AWSSQS/SQSClient.swift b/Sources/Services/AWSSQS/Sources/AWSSQS/SQSClient.swift index 1bda64e91d0..03bf9f22a1d 100644 --- a/Sources/Services/AWSSQS/Sources/AWSSQS/SQSClient.swift +++ b/Sources/Services/AWSSQS/Sources/AWSSQS/SQSClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class SQSClient: ClientRuntime.Client { public static let clientName = "SQSClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: SQSClient.SQSClientConfiguration let serviceName = "SQS" @@ -86,52 +86,54 @@ public class SQSClient: ClientRuntime.Client { } extension SQSClient { + public class SQSClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension SQSClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: SQSClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSQSAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSQSAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSQSAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSQSAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultSQSAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultSQSAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(SQSClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSSSM/Sources/AWSSSM/SSMClient.swift b/Sources/Services/AWSSSM/Sources/AWSSSM/SSMClient.swift index 570b5c37f4f..de6f755689e 100644 --- a/Sources/Services/AWSSSM/Sources/AWSSSM/SSMClient.swift +++ b/Sources/Services/AWSSSM/Sources/AWSSSM/SSMClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class SSMClient: ClientRuntime.Client { public static let clientName = "SSMClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: SSMClient.SSMClientConfiguration let serviceName = "SSM" @@ -87,52 +87,54 @@ public class SSMClient: ClientRuntime.Client { } extension SSMClient { + public class SSMClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension SSMClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: SSMClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSSMAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSSMAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSSMAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSSMAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultSSMAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultSSMAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(SSMClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSSSMContacts/Sources/AWSSSMContacts/SSMContactsClient.swift b/Sources/Services/AWSSSMContacts/Sources/AWSSSMContacts/SSMContactsClient.swift index 5688e6d0583..a2423d6c927 100644 --- a/Sources/Services/AWSSSMContacts/Sources/AWSSSMContacts/SSMContactsClient.swift +++ b/Sources/Services/AWSSSMContacts/Sources/AWSSSMContacts/SSMContactsClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class SSMContactsClient: ClientRuntime.Client { public static let clientName = "SSMContactsClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: SSMContactsClient.SSMContactsClientConfiguration let serviceName = "SSM Contacts" @@ -87,52 +87,54 @@ public class SSMContactsClient: ClientRuntime.Client { } extension SSMContactsClient { + public class SSMContactsClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension SSMContactsClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: SSMContactsClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSSMContactsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSSMContactsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSSMContactsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSSMContactsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultSSMContactsAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultSSMContactsAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(SSMContactsClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSSSMIncidents/Sources/AWSSSMIncidents/SSMIncidentsClient.swift b/Sources/Services/AWSSSMIncidents/Sources/AWSSSMIncidents/SSMIncidentsClient.swift index 4ecd830b984..1da06ebca37 100644 --- a/Sources/Services/AWSSSMIncidents/Sources/AWSSSMIncidents/SSMIncidentsClient.swift +++ b/Sources/Services/AWSSSMIncidents/Sources/AWSSSMIncidents/SSMIncidentsClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class SSMIncidentsClient: ClientRuntime.Client { public static let clientName = "SSMIncidentsClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: SSMIncidentsClient.SSMIncidentsClientConfiguration let serviceName = "SSM Incidents" @@ -87,52 +87,54 @@ public class SSMIncidentsClient: ClientRuntime.Client { } extension SSMIncidentsClient { + public class SSMIncidentsClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension SSMIncidentsClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: SSMIncidentsClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSSMIncidentsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSSMIncidentsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSSMIncidentsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSSMIncidentsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultSSMIncidentsAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultSSMIncidentsAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(SSMIncidentsClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSSSMQuickSetup/Sources/AWSSSMQuickSetup/SSMQuickSetupClient.swift b/Sources/Services/AWSSSMQuickSetup/Sources/AWSSSMQuickSetup/SSMQuickSetupClient.swift index 51cc2342dd7..752955e9414 100644 --- a/Sources/Services/AWSSSMQuickSetup/Sources/AWSSSMQuickSetup/SSMQuickSetupClient.swift +++ b/Sources/Services/AWSSSMQuickSetup/Sources/AWSSSMQuickSetup/SSMQuickSetupClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class SSMQuickSetupClient: ClientRuntime.Client { public static let clientName = "SSMQuickSetupClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: SSMQuickSetupClient.SSMQuickSetupClientConfiguration let serviceName = "SSM QuickSetup" @@ -86,52 +86,54 @@ public class SSMQuickSetupClient: ClientRuntime.Client { } extension SSMQuickSetupClient { + public class SSMQuickSetupClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension SSMQuickSetupClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: SSMQuickSetupClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSSMQuickSetupAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSSMQuickSetupAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSSMQuickSetupAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSSMQuickSetupAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultSSMQuickSetupAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultSSMQuickSetupAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(SSMQuickSetupClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSSSO/Sources/AWSSSO/SSOClient.swift b/Sources/Services/AWSSSO/Sources/AWSSSO/SSOClient.swift index ab0317044ba..30ddec2fbf2 100644 --- a/Sources/Services/AWSSSO/Sources/AWSSSO/SSOClient.swift +++ b/Sources/Services/AWSSSO/Sources/AWSSSO/SSOClient.swift @@ -59,7 +59,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class SSOClient: ClientRuntime.Client { public static let clientName = "SSOClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: SSOClient.SSOClientConfiguration let serviceName = "SSO" @@ -81,52 +81,54 @@ public class SSOClient: ClientRuntime.Client { } extension SSOClient { + public class SSOClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -151,25 +153,158 @@ extension SSOClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: SSOClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSSOAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSSOAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSSOAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSSOAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultSSOAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultSSOAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(SSOClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSSSOAdmin/Sources/AWSSSOAdmin/SSOAdminClient.swift b/Sources/Services/AWSSSOAdmin/Sources/AWSSSOAdmin/SSOAdminClient.swift index 4f15b8b11a5..3d762349f73 100644 --- a/Sources/Services/AWSSSOAdmin/Sources/AWSSSOAdmin/SSOAdminClient.swift +++ b/Sources/Services/AWSSSOAdmin/Sources/AWSSSOAdmin/SSOAdminClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class SSOAdminClient: ClientRuntime.Client { public static let clientName = "SSOAdminClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: SSOAdminClient.SSOAdminClientConfiguration let serviceName = "SSO Admin" @@ -87,52 +87,54 @@ public class SSOAdminClient: ClientRuntime.Client { } extension SSOAdminClient { + public class SSOAdminClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension SSOAdminClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: SSOAdminClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSSOAdminAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSSOAdminAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSSOAdminAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSSOAdminAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultSSOAdminAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultSSOAdminAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(SSOAdminClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSSSOOIDC/Sources/AWSSSOOIDC/SSOOIDCClient.swift b/Sources/Services/AWSSSOOIDC/Sources/AWSSSOOIDC/SSOOIDCClient.swift index af7dd09818b..c494a40da15 100644 --- a/Sources/Services/AWSSSOOIDC/Sources/AWSSSOOIDC/SSOOIDCClient.swift +++ b/Sources/Services/AWSSSOOIDC/Sources/AWSSSOOIDC/SSOOIDCClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class SSOOIDCClient: ClientRuntime.Client { public static let clientName = "SSOOIDCClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: SSOOIDCClient.SSOOIDCClientConfiguration let serviceName = "SSO OIDC" @@ -85,52 +85,54 @@ public class SSOOIDCClient: ClientRuntime.Client { } extension SSOOIDCClient { + public class SSOOIDCClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension SSOOIDCClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: SSOOIDCClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSSOOIDCAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSSOOIDCAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSSOOIDCAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSSOOIDCAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultSSOOIDCAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultSSOOIDCAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(SSOOIDCClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSSTS/Sources/AWSSTS/STSClient.swift b/Sources/Services/AWSSTS/Sources/AWSSTS/STSClient.swift index 247247c44c1..a3d92811290 100644 --- a/Sources/Services/AWSSTS/Sources/AWSSTS/STSClient.swift +++ b/Sources/Services/AWSSTS/Sources/AWSSTS/STSClient.swift @@ -67,7 +67,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class STSClient: ClientRuntime.Client { public static let clientName = "STSClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: STSClient.STSClientConfiguration let serviceName = "STS" @@ -89,54 +89,56 @@ public class STSClient: ClientRuntime.Client { } extension STSClient { + public class STSClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var useGlobalEndpoint: Swift.Bool? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ useGlobalEndpoint: Swift.Bool?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ useGlobalEndpoint: Swift.Bool?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -162,25 +164,164 @@ extension STSClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: STSClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, useGlobalEndpoint: Swift.Bool? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, useGlobalEndpoint, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSTSAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + useGlobalEndpoint: Swift.Bool? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + useGlobalEndpoint, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSTSAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, useGlobalEndpoint: Swift.Bool? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), useGlobalEndpoint, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSTSAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + useGlobalEndpoint: Swift.Bool? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + useGlobalEndpoint, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSTSAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, useGlobalEndpoint: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + useGlobalEndpoint: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, nil, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultSTSAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + nil, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultSTSAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(STSClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSSWF/Sources/AWSSWF/SWFClient.swift b/Sources/Services/AWSSWF/Sources/AWSSWF/SWFClient.swift index de910cfdfc9..dc870ff8201 100644 --- a/Sources/Services/AWSSWF/Sources/AWSSWF/SWFClient.swift +++ b/Sources/Services/AWSSWF/Sources/AWSSWF/SWFClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class SWFClient: ClientRuntime.Client { public static let clientName = "SWFClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: SWFClient.SWFClientConfiguration let serviceName = "SWF" @@ -86,52 +86,54 @@ public class SWFClient: ClientRuntime.Client { } extension SWFClient { + public class SWFClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension SWFClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: SWFClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSWFAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSWFAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSWFAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSWFAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultSWFAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultSWFAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(SWFClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSSageMaker/Sources/AWSSageMaker/SageMakerClient.swift b/Sources/Services/AWSSageMaker/Sources/AWSSageMaker/SageMakerClient.swift index 5cf03139ace..a3c2d2bee5c 100644 --- a/Sources/Services/AWSSageMaker/Sources/AWSSageMaker/SageMakerClient.swift +++ b/Sources/Services/AWSSageMaker/Sources/AWSSageMaker/SageMakerClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class SageMakerClient: ClientRuntime.Client { public static let clientName = "SageMakerClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: SageMakerClient.SageMakerClientConfiguration let serviceName = "SageMaker" @@ -87,52 +87,54 @@ public class SageMakerClient: ClientRuntime.Client { } extension SageMakerClient { + public class SageMakerClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension SageMakerClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: SageMakerClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSageMakerAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSageMakerAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSageMakerAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSageMakerAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultSageMakerAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultSageMakerAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(SageMakerClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSSageMakerA2IRuntime/Sources/AWSSageMakerA2IRuntime/SageMakerA2IRuntimeClient.swift b/Sources/Services/AWSSageMakerA2IRuntime/Sources/AWSSageMakerA2IRuntime/SageMakerA2IRuntimeClient.swift index ee4550387a6..f834e0950dd 100644 --- a/Sources/Services/AWSSageMakerA2IRuntime/Sources/AWSSageMakerA2IRuntime/SageMakerA2IRuntimeClient.swift +++ b/Sources/Services/AWSSageMakerA2IRuntime/Sources/AWSSageMakerA2IRuntime/SageMakerA2IRuntimeClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class SageMakerA2IRuntimeClient: ClientRuntime.Client { public static let clientName = "SageMakerA2IRuntimeClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: SageMakerA2IRuntimeClient.SageMakerA2IRuntimeClientConfiguration let serviceName = "SageMaker A2I Runtime" @@ -86,52 +86,54 @@ public class SageMakerA2IRuntimeClient: ClientRuntime.Client { } extension SageMakerA2IRuntimeClient { + public class SageMakerA2IRuntimeClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension SageMakerA2IRuntimeClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: SageMakerA2IRuntimeClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSageMakerA2IRuntimeAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSageMakerA2IRuntimeAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSageMakerA2IRuntimeAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSageMakerA2IRuntimeAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultSageMakerA2IRuntimeAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultSageMakerA2IRuntimeAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(SageMakerA2IRuntimeClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSSageMakerFeatureStoreRuntime/Sources/AWSSageMakerFeatureStoreRuntime/SageMakerFeatureStoreRuntimeClient.swift b/Sources/Services/AWSSageMakerFeatureStoreRuntime/Sources/AWSSageMakerFeatureStoreRuntime/SageMakerFeatureStoreRuntimeClient.swift index 6caabee5833..d440a6dc725 100644 --- a/Sources/Services/AWSSageMakerFeatureStoreRuntime/Sources/AWSSageMakerFeatureStoreRuntime/SageMakerFeatureStoreRuntimeClient.swift +++ b/Sources/Services/AWSSageMakerFeatureStoreRuntime/Sources/AWSSageMakerFeatureStoreRuntime/SageMakerFeatureStoreRuntimeClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class SageMakerFeatureStoreRuntimeClient: ClientRuntime.Client { public static let clientName = "SageMakerFeatureStoreRuntimeClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: SageMakerFeatureStoreRuntimeClient.SageMakerFeatureStoreRuntimeClientConfiguration let serviceName = "SageMaker FeatureStore Runtime" @@ -85,52 +85,54 @@ public class SageMakerFeatureStoreRuntimeClient: ClientRuntime.Client { } extension SageMakerFeatureStoreRuntimeClient { + public class SageMakerFeatureStoreRuntimeClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension SageMakerFeatureStoreRuntimeClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: SageMakerFeatureStoreRuntimeClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSageMakerFeatureStoreRuntimeAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSageMakerFeatureStoreRuntimeAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSageMakerFeatureStoreRuntimeAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSageMakerFeatureStoreRuntimeAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultSageMakerFeatureStoreRuntimeAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultSageMakerFeatureStoreRuntimeAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(SageMakerFeatureStoreRuntimeClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSSageMakerGeospatial/Sources/AWSSageMakerGeospatial/SageMakerGeospatialClient.swift b/Sources/Services/AWSSageMakerGeospatial/Sources/AWSSageMakerGeospatial/SageMakerGeospatialClient.swift index 100cf926673..b47d339047d 100644 --- a/Sources/Services/AWSSageMakerGeospatial/Sources/AWSSageMakerGeospatial/SageMakerGeospatialClient.swift +++ b/Sources/Services/AWSSageMakerGeospatial/Sources/AWSSageMakerGeospatial/SageMakerGeospatialClient.swift @@ -66,7 +66,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class SageMakerGeospatialClient: ClientRuntime.Client { public static let clientName = "SageMakerGeospatialClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: SageMakerGeospatialClient.SageMakerGeospatialClientConfiguration let serviceName = "SageMaker Geospatial" @@ -88,52 +88,54 @@ public class SageMakerGeospatialClient: ClientRuntime.Client { } extension SageMakerGeospatialClient { + public class SageMakerGeospatialClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -158,25 +160,158 @@ extension SageMakerGeospatialClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: SageMakerGeospatialClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSageMakerGeospatialAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSageMakerGeospatialAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSageMakerGeospatialAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSageMakerGeospatialAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultSageMakerGeospatialAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultSageMakerGeospatialAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(SageMakerGeospatialClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSSageMakerMetrics/Sources/AWSSageMakerMetrics/SageMakerMetricsClient.swift b/Sources/Services/AWSSageMakerMetrics/Sources/AWSSageMakerMetrics/SageMakerMetricsClient.swift index fb415e2a11e..d19c5eceaa5 100644 --- a/Sources/Services/AWSSageMakerMetrics/Sources/AWSSageMakerMetrics/SageMakerMetricsClient.swift +++ b/Sources/Services/AWSSageMakerMetrics/Sources/AWSSageMakerMetrics/SageMakerMetricsClient.swift @@ -62,7 +62,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class SageMakerMetricsClient: ClientRuntime.Client { public static let clientName = "SageMakerMetricsClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: SageMakerMetricsClient.SageMakerMetricsClientConfiguration let serviceName = "SageMaker Metrics" @@ -84,52 +84,54 @@ public class SageMakerMetricsClient: ClientRuntime.Client { } extension SageMakerMetricsClient { + public class SageMakerMetricsClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -154,25 +156,158 @@ extension SageMakerMetricsClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: SageMakerMetricsClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSageMakerMetricsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSageMakerMetricsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSageMakerMetricsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSageMakerMetricsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultSageMakerMetricsAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultSageMakerMetricsAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(SageMakerMetricsClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSSageMakerRuntime/Sources/AWSSageMakerRuntime/SageMakerRuntimeClient.swift b/Sources/Services/AWSSageMakerRuntime/Sources/AWSSageMakerRuntime/SageMakerRuntimeClient.swift index 851b88f4048..d84e3663334 100644 --- a/Sources/Services/AWSSageMakerRuntime/Sources/AWSSageMakerRuntime/SageMakerRuntimeClient.swift +++ b/Sources/Services/AWSSageMakerRuntime/Sources/AWSSageMakerRuntime/SageMakerRuntimeClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class SageMakerRuntimeClient: ClientRuntime.Client { public static let clientName = "SageMakerRuntimeClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: SageMakerRuntimeClient.SageMakerRuntimeClientConfiguration let serviceName = "SageMaker Runtime" @@ -85,52 +85,54 @@ public class SageMakerRuntimeClient: ClientRuntime.Client { } extension SageMakerRuntimeClient { + public class SageMakerRuntimeClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension SageMakerRuntimeClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: SageMakerRuntimeClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSageMakerRuntimeAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSageMakerRuntimeAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSageMakerRuntimeAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSageMakerRuntimeAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultSageMakerRuntimeAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultSageMakerRuntimeAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(SageMakerRuntimeClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSSagemakerEdge/Sources/AWSSagemakerEdge/SagemakerEdgeClient.swift b/Sources/Services/AWSSagemakerEdge/Sources/AWSSagemakerEdge/SagemakerEdgeClient.swift index 9450cf7793c..ee9f4f609ed 100644 --- a/Sources/Services/AWSSagemakerEdge/Sources/AWSSagemakerEdge/SagemakerEdgeClient.swift +++ b/Sources/Services/AWSSagemakerEdge/Sources/AWSSagemakerEdge/SagemakerEdgeClient.swift @@ -62,7 +62,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class SagemakerEdgeClient: ClientRuntime.Client { public static let clientName = "SagemakerEdgeClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: SagemakerEdgeClient.SagemakerEdgeClientConfiguration let serviceName = "Sagemaker Edge" @@ -84,52 +84,54 @@ public class SagemakerEdgeClient: ClientRuntime.Client { } extension SagemakerEdgeClient { + public class SagemakerEdgeClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -154,25 +156,158 @@ extension SagemakerEdgeClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: SagemakerEdgeClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSagemakerEdgeAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSagemakerEdgeAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSagemakerEdgeAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSagemakerEdgeAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultSagemakerEdgeAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultSagemakerEdgeAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(SagemakerEdgeClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSSavingsplans/Sources/AWSSavingsplans/SavingsplansClient.swift b/Sources/Services/AWSSavingsplans/Sources/AWSSavingsplans/SavingsplansClient.swift index 9f3879b93f6..e26ddd3c3df 100644 --- a/Sources/Services/AWSSavingsplans/Sources/AWSSavingsplans/SavingsplansClient.swift +++ b/Sources/Services/AWSSavingsplans/Sources/AWSSavingsplans/SavingsplansClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class SavingsplansClient: ClientRuntime.Client { public static let clientName = "SavingsplansClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: SavingsplansClient.SavingsplansClientConfiguration let serviceName = "savingsplans" @@ -86,52 +86,54 @@ public class SavingsplansClient: ClientRuntime.Client { } extension SavingsplansClient { + public class SavingsplansClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension SavingsplansClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: SavingsplansClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSavingsplansAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSavingsplansAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSavingsplansAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSavingsplansAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultSavingsplansAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultSavingsplansAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(SavingsplansClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSScheduler/Sources/AWSScheduler/SchedulerClient.swift b/Sources/Services/AWSScheduler/Sources/AWSScheduler/SchedulerClient.swift index af6a996c20a..a8e83ed6892 100644 --- a/Sources/Services/AWSScheduler/Sources/AWSScheduler/SchedulerClient.swift +++ b/Sources/Services/AWSScheduler/Sources/AWSScheduler/SchedulerClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class SchedulerClient: ClientRuntime.Client { public static let clientName = "SchedulerClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: SchedulerClient.SchedulerClientConfiguration let serviceName = "Scheduler" @@ -87,52 +87,54 @@ public class SchedulerClient: ClientRuntime.Client { } extension SchedulerClient { + public class SchedulerClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension SchedulerClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: SchedulerClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSchedulerAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSchedulerAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSchedulerAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSchedulerAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultSchedulerAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultSchedulerAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(SchedulerClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSSchemas/Sources/AWSSchemas/SchemasClient.swift b/Sources/Services/AWSSchemas/Sources/AWSSchemas/SchemasClient.swift index f8f6f7cd945..0c44fcbe348 100644 --- a/Sources/Services/AWSSchemas/Sources/AWSSchemas/SchemasClient.swift +++ b/Sources/Services/AWSSchemas/Sources/AWSSchemas/SchemasClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class SchemasClient: ClientRuntime.Client { public static let clientName = "SchemasClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: SchemasClient.SchemasClientConfiguration let serviceName = "schemas" @@ -87,52 +87,54 @@ public class SchemasClient: ClientRuntime.Client { } extension SchemasClient { + public class SchemasClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension SchemasClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: SchemasClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSchemasAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSchemasAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSchemasAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSchemasAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultSchemasAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultSchemasAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(SchemasClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSSecretsManager/Sources/AWSSecretsManager/SecretsManagerClient.swift b/Sources/Services/AWSSecretsManager/Sources/AWSSecretsManager/SecretsManagerClient.swift index 11fa0fc79e6..fe4b3c78695 100644 --- a/Sources/Services/AWSSecretsManager/Sources/AWSSecretsManager/SecretsManagerClient.swift +++ b/Sources/Services/AWSSecretsManager/Sources/AWSSecretsManager/SecretsManagerClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class SecretsManagerClient: ClientRuntime.Client { public static let clientName = "SecretsManagerClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: SecretsManagerClient.SecretsManagerClientConfiguration let serviceName = "Secrets Manager" @@ -87,52 +87,54 @@ public class SecretsManagerClient: ClientRuntime.Client { } extension SecretsManagerClient { + public class SecretsManagerClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension SecretsManagerClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: SecretsManagerClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSecretsManagerAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSecretsManagerAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSecretsManagerAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSecretsManagerAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultSecretsManagerAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultSecretsManagerAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(SecretsManagerClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSSecurityHub/Sources/AWSSecurityHub/SecurityHubClient.swift b/Sources/Services/AWSSecurityHub/Sources/AWSSecurityHub/SecurityHubClient.swift index 7c47d4c0867..d3dce700687 100644 --- a/Sources/Services/AWSSecurityHub/Sources/AWSSecurityHub/SecurityHubClient.swift +++ b/Sources/Services/AWSSecurityHub/Sources/AWSSecurityHub/SecurityHubClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class SecurityHubClient: ClientRuntime.Client { public static let clientName = "SecurityHubClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: SecurityHubClient.SecurityHubClientConfiguration let serviceName = "SecurityHub" @@ -86,52 +86,54 @@ public class SecurityHubClient: ClientRuntime.Client { } extension SecurityHubClient { + public class SecurityHubClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension SecurityHubClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: SecurityHubClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSecurityHubAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSecurityHubAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSecurityHubAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSecurityHubAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultSecurityHubAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultSecurityHubAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(SecurityHubClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSSecurityIR/Sources/AWSSecurityIR/SecurityIRClient.swift b/Sources/Services/AWSSecurityIR/Sources/AWSSecurityIR/SecurityIRClient.swift index 96692cda901..cb3f4c43631 100644 --- a/Sources/Services/AWSSecurityIR/Sources/AWSSecurityIR/SecurityIRClient.swift +++ b/Sources/Services/AWSSecurityIR/Sources/AWSSecurityIR/SecurityIRClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class SecurityIRClient: ClientRuntime.Client { public static let clientName = "SecurityIRClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: SecurityIRClient.SecurityIRClientConfiguration let serviceName = "Security IR" @@ -87,52 +87,54 @@ public class SecurityIRClient: ClientRuntime.Client { } extension SecurityIRClient { + public class SecurityIRClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension SecurityIRClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: SecurityIRClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSecurityIRAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSecurityIRAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSecurityIRAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSecurityIRAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultSecurityIRAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultSecurityIRAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(SecurityIRClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSSecurityLake/Sources/AWSSecurityLake/SecurityLakeClient.swift b/Sources/Services/AWSSecurityLake/Sources/AWSSecurityLake/SecurityLakeClient.swift index cf77815c7b6..39accc2295a 100644 --- a/Sources/Services/AWSSecurityLake/Sources/AWSSecurityLake/SecurityLakeClient.swift +++ b/Sources/Services/AWSSecurityLake/Sources/AWSSecurityLake/SecurityLakeClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class SecurityLakeClient: ClientRuntime.Client { public static let clientName = "SecurityLakeClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: SecurityLakeClient.SecurityLakeClientConfiguration let serviceName = "SecurityLake" @@ -85,52 +85,54 @@ public class SecurityLakeClient: ClientRuntime.Client { } extension SecurityLakeClient { + public class SecurityLakeClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension SecurityLakeClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: SecurityLakeClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSecurityLakeAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSecurityLakeAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSecurityLakeAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSecurityLakeAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultSecurityLakeAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultSecurityLakeAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(SecurityLakeClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSServerlessApplicationRepository/Sources/AWSServerlessApplicationRepository/ServerlessApplicationRepositoryClient.swift b/Sources/Services/AWSServerlessApplicationRepository/Sources/AWSServerlessApplicationRepository/ServerlessApplicationRepositoryClient.swift index 69751e797fa..63922681542 100644 --- a/Sources/Services/AWSServerlessApplicationRepository/Sources/AWSServerlessApplicationRepository/ServerlessApplicationRepositoryClient.swift +++ b/Sources/Services/AWSServerlessApplicationRepository/Sources/AWSServerlessApplicationRepository/ServerlessApplicationRepositoryClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ServerlessApplicationRepositoryClient: ClientRuntime.Client { public static let clientName = "ServerlessApplicationRepositoryClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ServerlessApplicationRepositoryClient.ServerlessApplicationRepositoryClientConfiguration let serviceName = "ServerlessApplicationRepository" @@ -85,52 +85,54 @@ public class ServerlessApplicationRepositoryClient: ClientRuntime.Client { } extension ServerlessApplicationRepositoryClient { + public class ServerlessApplicationRepositoryClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension ServerlessApplicationRepositoryClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: ServerlessApplicationRepositoryClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultServerlessApplicationRepositoryAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultServerlessApplicationRepositoryAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultServerlessApplicationRepositoryAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultServerlessApplicationRepositoryAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultServerlessApplicationRepositoryAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultServerlessApplicationRepositoryAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ServerlessApplicationRepositoryClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSServiceCatalog/Sources/AWSServiceCatalog/ServiceCatalogClient.swift b/Sources/Services/AWSServiceCatalog/Sources/AWSServiceCatalog/ServiceCatalogClient.swift index c4c8e48b61c..9eaced89cb6 100644 --- a/Sources/Services/AWSServiceCatalog/Sources/AWSServiceCatalog/ServiceCatalogClient.swift +++ b/Sources/Services/AWSServiceCatalog/Sources/AWSServiceCatalog/ServiceCatalogClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ServiceCatalogClient: ClientRuntime.Client { public static let clientName = "ServiceCatalogClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ServiceCatalogClient.ServiceCatalogClientConfiguration let serviceName = "Service Catalog" @@ -86,52 +86,54 @@ public class ServiceCatalogClient: ClientRuntime.Client { } extension ServiceCatalogClient { + public class ServiceCatalogClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension ServiceCatalogClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: ServiceCatalogClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultServiceCatalogAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultServiceCatalogAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultServiceCatalogAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultServiceCatalogAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultServiceCatalogAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultServiceCatalogAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ServiceCatalogClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSServiceCatalogAppRegistry/Sources/AWSServiceCatalogAppRegistry/ServiceCatalogAppRegistryClient.swift b/Sources/Services/AWSServiceCatalogAppRegistry/Sources/AWSServiceCatalogAppRegistry/ServiceCatalogAppRegistryClient.swift index 08e8df217da..551dbe0d521 100644 --- a/Sources/Services/AWSServiceCatalogAppRegistry/Sources/AWSServiceCatalogAppRegistry/ServiceCatalogAppRegistryClient.swift +++ b/Sources/Services/AWSServiceCatalogAppRegistry/Sources/AWSServiceCatalogAppRegistry/ServiceCatalogAppRegistryClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ServiceCatalogAppRegistryClient: ClientRuntime.Client { public static let clientName = "ServiceCatalogAppRegistryClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ServiceCatalogAppRegistryClient.ServiceCatalogAppRegistryClientConfiguration let serviceName = "Service Catalog AppRegistry" @@ -87,52 +87,54 @@ public class ServiceCatalogAppRegistryClient: ClientRuntime.Client { } extension ServiceCatalogAppRegistryClient { + public class ServiceCatalogAppRegistryClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension ServiceCatalogAppRegistryClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: ServiceCatalogAppRegistryClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultServiceCatalogAppRegistryAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultServiceCatalogAppRegistryAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultServiceCatalogAppRegistryAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultServiceCatalogAppRegistryAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultServiceCatalogAppRegistryAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultServiceCatalogAppRegistryAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ServiceCatalogAppRegistryClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSServiceDiscovery/Sources/AWSServiceDiscovery/ServiceDiscoveryClient.swift b/Sources/Services/AWSServiceDiscovery/Sources/AWSServiceDiscovery/ServiceDiscoveryClient.swift index 734cf37ff62..3c1e726c8f5 100644 --- a/Sources/Services/AWSServiceDiscovery/Sources/AWSServiceDiscovery/ServiceDiscoveryClient.swift +++ b/Sources/Services/AWSServiceDiscovery/Sources/AWSServiceDiscovery/ServiceDiscoveryClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ServiceDiscoveryClient: ClientRuntime.Client { public static let clientName = "ServiceDiscoveryClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ServiceDiscoveryClient.ServiceDiscoveryClientConfiguration let serviceName = "ServiceDiscovery" @@ -86,52 +86,54 @@ public class ServiceDiscoveryClient: ClientRuntime.Client { } extension ServiceDiscoveryClient { + public class ServiceDiscoveryClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension ServiceDiscoveryClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: ServiceDiscoveryClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultServiceDiscoveryAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultServiceDiscoveryAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultServiceDiscoveryAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultServiceDiscoveryAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultServiceDiscoveryAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultServiceDiscoveryAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ServiceDiscoveryClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSServiceQuotas/Sources/AWSServiceQuotas/ServiceQuotasClient.swift b/Sources/Services/AWSServiceQuotas/Sources/AWSServiceQuotas/ServiceQuotasClient.swift index 9c2e05b9775..aa3d4e6c82c 100644 --- a/Sources/Services/AWSServiceQuotas/Sources/AWSServiceQuotas/ServiceQuotasClient.swift +++ b/Sources/Services/AWSServiceQuotas/Sources/AWSServiceQuotas/ServiceQuotasClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ServiceQuotasClient: ClientRuntime.Client { public static let clientName = "ServiceQuotasClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ServiceQuotasClient.ServiceQuotasClientConfiguration let serviceName = "Service Quotas" @@ -85,52 +85,54 @@ public class ServiceQuotasClient: ClientRuntime.Client { } extension ServiceQuotasClient { + public class ServiceQuotasClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension ServiceQuotasClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: ServiceQuotasClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultServiceQuotasAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultServiceQuotasAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultServiceQuotasAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultServiceQuotasAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultServiceQuotasAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultServiceQuotasAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ServiceQuotasClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSShield/Sources/AWSShield/ShieldClient.swift b/Sources/Services/AWSShield/Sources/AWSShield/ShieldClient.swift index 1d96b8bb001..5b340310d8a 100644 --- a/Sources/Services/AWSShield/Sources/AWSShield/ShieldClient.swift +++ b/Sources/Services/AWSShield/Sources/AWSShield/ShieldClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class ShieldClient: ClientRuntime.Client { public static let clientName = "ShieldClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: ShieldClient.ShieldClientConfiguration let serviceName = "Shield" @@ -85,52 +85,54 @@ public class ShieldClient: ClientRuntime.Client { } extension ShieldClient { + public class ShieldClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension ShieldClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: ShieldClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultShieldAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultShieldAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultShieldAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultShieldAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultShieldAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultShieldAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(ShieldClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSSigner/Sources/AWSSigner/SignerClient.swift b/Sources/Services/AWSSigner/Sources/AWSSigner/SignerClient.swift index a8391d2fdf8..16306e1b14c 100644 --- a/Sources/Services/AWSSigner/Sources/AWSSigner/SignerClient.swift +++ b/Sources/Services/AWSSigner/Sources/AWSSigner/SignerClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class SignerClient: ClientRuntime.Client { public static let clientName = "SignerClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: SignerClient.SignerClientConfiguration let serviceName = "signer" @@ -87,52 +87,54 @@ public class SignerClient: ClientRuntime.Client { } extension SignerClient { + public class SignerClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension SignerClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: SignerClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSignerAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSignerAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSignerAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSignerAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultSignerAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultSignerAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(SignerClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSSimSpaceWeaver/Sources/AWSSimSpaceWeaver/SimSpaceWeaverClient.swift b/Sources/Services/AWSSimSpaceWeaver/Sources/AWSSimSpaceWeaver/SimSpaceWeaverClient.swift index 149f6a79c56..481f3f30f54 100644 --- a/Sources/Services/AWSSimSpaceWeaver/Sources/AWSSimSpaceWeaver/SimSpaceWeaverClient.swift +++ b/Sources/Services/AWSSimSpaceWeaver/Sources/AWSSimSpaceWeaver/SimSpaceWeaverClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class SimSpaceWeaverClient: ClientRuntime.Client { public static let clientName = "SimSpaceWeaverClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: SimSpaceWeaverClient.SimSpaceWeaverClientConfiguration let serviceName = "SimSpaceWeaver" @@ -87,52 +87,54 @@ public class SimSpaceWeaverClient: ClientRuntime.Client { } extension SimSpaceWeaverClient { + public class SimSpaceWeaverClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension SimSpaceWeaverClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: SimSpaceWeaverClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSimSpaceWeaverAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSimSpaceWeaverAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSimSpaceWeaverAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSimSpaceWeaverAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultSimSpaceWeaverAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultSimSpaceWeaverAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(SimSpaceWeaverClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSSnowDeviceManagement/Sources/AWSSnowDeviceManagement/SnowDeviceManagementClient.swift b/Sources/Services/AWSSnowDeviceManagement/Sources/AWSSnowDeviceManagement/SnowDeviceManagementClient.swift index d3c2b2c66ee..7b86f0da7b2 100644 --- a/Sources/Services/AWSSnowDeviceManagement/Sources/AWSSnowDeviceManagement/SnowDeviceManagementClient.swift +++ b/Sources/Services/AWSSnowDeviceManagement/Sources/AWSSnowDeviceManagement/SnowDeviceManagementClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class SnowDeviceManagementClient: ClientRuntime.Client { public static let clientName = "SnowDeviceManagementClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: SnowDeviceManagementClient.SnowDeviceManagementClientConfiguration let serviceName = "Snow Device Management" @@ -87,52 +87,54 @@ public class SnowDeviceManagementClient: ClientRuntime.Client { } extension SnowDeviceManagementClient { + public class SnowDeviceManagementClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension SnowDeviceManagementClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: SnowDeviceManagementClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSnowDeviceManagementAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSnowDeviceManagementAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSnowDeviceManagementAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSnowDeviceManagementAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultSnowDeviceManagementAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultSnowDeviceManagementAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(SnowDeviceManagementClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSSnowball/Sources/AWSSnowball/SnowballClient.swift b/Sources/Services/AWSSnowball/Sources/AWSSnowball/SnowballClient.swift index b18ffaef12b..637de678959 100644 --- a/Sources/Services/AWSSnowball/Sources/AWSSnowball/SnowballClient.swift +++ b/Sources/Services/AWSSnowball/Sources/AWSSnowball/SnowballClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class SnowballClient: ClientRuntime.Client { public static let clientName = "SnowballClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: SnowballClient.SnowballClientConfiguration let serviceName = "Snowball" @@ -86,52 +86,54 @@ public class SnowballClient: ClientRuntime.Client { } extension SnowballClient { + public class SnowballClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension SnowballClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: SnowballClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSnowballAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSnowballAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSnowballAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSnowballAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultSnowballAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultSnowballAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(SnowballClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSSocialMessaging/Sources/AWSSocialMessaging/SocialMessagingClient.swift b/Sources/Services/AWSSocialMessaging/Sources/AWSSocialMessaging/SocialMessagingClient.swift index d3887e487a7..55d228508db 100644 --- a/Sources/Services/AWSSocialMessaging/Sources/AWSSocialMessaging/SocialMessagingClient.swift +++ b/Sources/Services/AWSSocialMessaging/Sources/AWSSocialMessaging/SocialMessagingClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class SocialMessagingClient: ClientRuntime.Client { public static let clientName = "SocialMessagingClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: SocialMessagingClient.SocialMessagingClientConfiguration let serviceName = "SocialMessaging" @@ -86,52 +86,54 @@ public class SocialMessagingClient: ClientRuntime.Client { } extension SocialMessagingClient { + public class SocialMessagingClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension SocialMessagingClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: SocialMessagingClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSocialMessagingAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSocialMessagingAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSocialMessagingAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSocialMessagingAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultSocialMessagingAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultSocialMessagingAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(SocialMessagingClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSSsmSap/Sources/AWSSsmSap/SsmSapClient.swift b/Sources/Services/AWSSsmSap/Sources/AWSSsmSap/SsmSapClient.swift index 8f8349dd726..92f7fb879c3 100644 --- a/Sources/Services/AWSSsmSap/Sources/AWSSsmSap/SsmSapClient.swift +++ b/Sources/Services/AWSSsmSap/Sources/AWSSsmSap/SsmSapClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class SsmSapClient: ClientRuntime.Client { public static let clientName = "SsmSapClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: SsmSapClient.SsmSapClientConfiguration let serviceName = "Ssm Sap" @@ -85,52 +85,54 @@ public class SsmSapClient: ClientRuntime.Client { } extension SsmSapClient { + public class SsmSapClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension SsmSapClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: SsmSapClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSsmSapAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSsmSapAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSsmSapAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSsmSapAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultSsmSapAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultSsmSapAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(SsmSapClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSStorageGateway/Sources/AWSStorageGateway/StorageGatewayClient.swift b/Sources/Services/AWSStorageGateway/Sources/AWSStorageGateway/StorageGatewayClient.swift index fa62e108eaf..c20a42f7221 100644 --- a/Sources/Services/AWSStorageGateway/Sources/AWSStorageGateway/StorageGatewayClient.swift +++ b/Sources/Services/AWSStorageGateway/Sources/AWSStorageGateway/StorageGatewayClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class StorageGatewayClient: ClientRuntime.Client { public static let clientName = "StorageGatewayClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: StorageGatewayClient.StorageGatewayClientConfiguration let serviceName = "Storage Gateway" @@ -86,52 +86,54 @@ public class StorageGatewayClient: ClientRuntime.Client { } extension StorageGatewayClient { + public class StorageGatewayClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension StorageGatewayClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: StorageGatewayClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultStorageGatewayAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultStorageGatewayAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultStorageGatewayAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultStorageGatewayAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultStorageGatewayAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultStorageGatewayAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(StorageGatewayClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSSupplyChain/Sources/AWSSupplyChain/SupplyChainClient.swift b/Sources/Services/AWSSupplyChain/Sources/AWSSupplyChain/SupplyChainClient.swift index f16a1fc8c67..97bbb72575e 100644 --- a/Sources/Services/AWSSupplyChain/Sources/AWSSupplyChain/SupplyChainClient.swift +++ b/Sources/Services/AWSSupplyChain/Sources/AWSSupplyChain/SupplyChainClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class SupplyChainClient: ClientRuntime.Client { public static let clientName = "SupplyChainClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: SupplyChainClient.SupplyChainClientConfiguration let serviceName = "SupplyChain" @@ -87,52 +87,54 @@ public class SupplyChainClient: ClientRuntime.Client { } extension SupplyChainClient { + public class SupplyChainClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension SupplyChainClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: SupplyChainClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSupplyChainAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSupplyChainAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSupplyChainAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSupplyChainAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultSupplyChainAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultSupplyChainAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(SupplyChainClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSSupport/Sources/AWSSupport/SupportClient.swift b/Sources/Services/AWSSupport/Sources/AWSSupport/SupportClient.swift index 19b6cba3b00..d8b5a0544f9 100644 --- a/Sources/Services/AWSSupport/Sources/AWSSupport/SupportClient.swift +++ b/Sources/Services/AWSSupport/Sources/AWSSupport/SupportClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class SupportClient: ClientRuntime.Client { public static let clientName = "SupportClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: SupportClient.SupportClientConfiguration let serviceName = "Support" @@ -85,52 +85,54 @@ public class SupportClient: ClientRuntime.Client { } extension SupportClient { + public class SupportClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension SupportClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: SupportClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSupportAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSupportAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSupportAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSupportAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultSupportAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultSupportAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(SupportClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSSupportApp/Sources/AWSSupportApp/SupportAppClient.swift b/Sources/Services/AWSSupportApp/Sources/AWSSupportApp/SupportAppClient.swift index 1a0f99a0f9d..a6424056c70 100644 --- a/Sources/Services/AWSSupportApp/Sources/AWSSupportApp/SupportAppClient.swift +++ b/Sources/Services/AWSSupportApp/Sources/AWSSupportApp/SupportAppClient.swift @@ -62,7 +62,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class SupportAppClient: ClientRuntime.Client { public static let clientName = "SupportAppClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: SupportAppClient.SupportAppClientConfiguration let serviceName = "Support App" @@ -84,52 +84,54 @@ public class SupportAppClient: ClientRuntime.Client { } extension SupportAppClient { + public class SupportAppClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -154,25 +156,158 @@ extension SupportAppClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: SupportAppClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSupportAppAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSupportAppAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSupportAppAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSupportAppAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultSupportAppAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultSupportAppAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(SupportAppClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSSynthetics/Sources/AWSSynthetics/SyntheticsClient.swift b/Sources/Services/AWSSynthetics/Sources/AWSSynthetics/SyntheticsClient.swift index 7c62ee31d59..18f5430089c 100644 --- a/Sources/Services/AWSSynthetics/Sources/AWSSynthetics/SyntheticsClient.swift +++ b/Sources/Services/AWSSynthetics/Sources/AWSSynthetics/SyntheticsClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class SyntheticsClient: ClientRuntime.Client { public static let clientName = "SyntheticsClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: SyntheticsClient.SyntheticsClientConfiguration let serviceName = "synthetics" @@ -85,52 +85,54 @@ public class SyntheticsClient: ClientRuntime.Client { } extension SyntheticsClient { + public class SyntheticsClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension SyntheticsClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: SyntheticsClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSyntheticsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSyntheticsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultSyntheticsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultSyntheticsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultSyntheticsAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultSyntheticsAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(SyntheticsClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSTaxSettings/Sources/AWSTaxSettings/TaxSettingsClient.swift b/Sources/Services/AWSTaxSettings/Sources/AWSTaxSettings/TaxSettingsClient.swift index d28b816cbe5..e08a8ef3874 100644 --- a/Sources/Services/AWSTaxSettings/Sources/AWSTaxSettings/TaxSettingsClient.swift +++ b/Sources/Services/AWSTaxSettings/Sources/AWSTaxSettings/TaxSettingsClient.swift @@ -62,7 +62,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class TaxSettingsClient: ClientRuntime.Client { public static let clientName = "TaxSettingsClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: TaxSettingsClient.TaxSettingsClientConfiguration let serviceName = "TaxSettings" @@ -84,52 +84,54 @@ public class TaxSettingsClient: ClientRuntime.Client { } extension TaxSettingsClient { + public class TaxSettingsClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -154,25 +156,158 @@ extension TaxSettingsClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: TaxSettingsClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultTaxSettingsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultTaxSettingsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultTaxSettingsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultTaxSettingsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultTaxSettingsAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultTaxSettingsAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(TaxSettingsClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSTextract/Sources/AWSTextract/TextractClient.swift b/Sources/Services/AWSTextract/Sources/AWSTextract/TextractClient.swift index 86df0a3bbbd..ac39b50658b 100644 --- a/Sources/Services/AWSTextract/Sources/AWSTextract/TextractClient.swift +++ b/Sources/Services/AWSTextract/Sources/AWSTextract/TextractClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class TextractClient: ClientRuntime.Client { public static let clientName = "TextractClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: TextractClient.TextractClientConfiguration let serviceName = "Textract" @@ -87,52 +87,54 @@ public class TextractClient: ClientRuntime.Client { } extension TextractClient { + public class TextractClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension TextractClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: TextractClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultTextractAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultTextractAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultTextractAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultTextractAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultTextractAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultTextractAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(TextractClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSTimestreamInfluxDB/Sources/AWSTimestreamInfluxDB/TimestreamInfluxDBClient.swift b/Sources/Services/AWSTimestreamInfluxDB/Sources/AWSTimestreamInfluxDB/TimestreamInfluxDBClient.swift index 73a692715a6..ede77bca67c 100644 --- a/Sources/Services/AWSTimestreamInfluxDB/Sources/AWSTimestreamInfluxDB/TimestreamInfluxDBClient.swift +++ b/Sources/Services/AWSTimestreamInfluxDB/Sources/AWSTimestreamInfluxDB/TimestreamInfluxDBClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class TimestreamInfluxDBClient: ClientRuntime.Client { public static let clientName = "TimestreamInfluxDBClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: TimestreamInfluxDBClient.TimestreamInfluxDBClientConfiguration let serviceName = "Timestream InfluxDB" @@ -85,52 +85,54 @@ public class TimestreamInfluxDBClient: ClientRuntime.Client { } extension TimestreamInfluxDBClient { + public class TimestreamInfluxDBClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension TimestreamInfluxDBClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: TimestreamInfluxDBClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultTimestreamInfluxDBAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultTimestreamInfluxDBAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultTimestreamInfluxDBAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultTimestreamInfluxDBAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultTimestreamInfluxDBAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultTimestreamInfluxDBAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(TimestreamInfluxDBClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSTimestreamQuery/Sources/AWSTimestreamQuery/TimestreamQueryClient.swift b/Sources/Services/AWSTimestreamQuery/Sources/AWSTimestreamQuery/TimestreamQueryClient.swift index 58ecf8820f4..b813ec5a986 100644 --- a/Sources/Services/AWSTimestreamQuery/Sources/AWSTimestreamQuery/TimestreamQueryClient.swift +++ b/Sources/Services/AWSTimestreamQuery/Sources/AWSTimestreamQuery/TimestreamQueryClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class TimestreamQueryClient: ClientRuntime.Client { public static let clientName = "TimestreamQueryClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: TimestreamQueryClient.TimestreamQueryClientConfiguration let serviceName = "Timestream Query" @@ -87,52 +87,54 @@ public class TimestreamQueryClient: ClientRuntime.Client { } extension TimestreamQueryClient { + public class TimestreamQueryClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension TimestreamQueryClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: TimestreamQueryClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultTimestreamQueryAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultTimestreamQueryAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultTimestreamQueryAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultTimestreamQueryAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultTimestreamQueryAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultTimestreamQueryAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(TimestreamQueryClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSTimestreamWrite/Sources/AWSTimestreamWrite/TimestreamWriteClient.swift b/Sources/Services/AWSTimestreamWrite/Sources/AWSTimestreamWrite/TimestreamWriteClient.swift index 28a8cc6d7b9..1b63635021f 100644 --- a/Sources/Services/AWSTimestreamWrite/Sources/AWSTimestreamWrite/TimestreamWriteClient.swift +++ b/Sources/Services/AWSTimestreamWrite/Sources/AWSTimestreamWrite/TimestreamWriteClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class TimestreamWriteClient: ClientRuntime.Client { public static let clientName = "TimestreamWriteClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: TimestreamWriteClient.TimestreamWriteClientConfiguration let serviceName = "Timestream Write" @@ -86,52 +86,54 @@ public class TimestreamWriteClient: ClientRuntime.Client { } extension TimestreamWriteClient { + public class TimestreamWriteClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension TimestreamWriteClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: TimestreamWriteClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultTimestreamWriteAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultTimestreamWriteAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultTimestreamWriteAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultTimestreamWriteAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultTimestreamWriteAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultTimestreamWriteAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(TimestreamWriteClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSTnb/Sources/AWSTnb/TnbClient.swift b/Sources/Services/AWSTnb/Sources/AWSTnb/TnbClient.swift index d4cba768f7f..953d0859a9c 100644 --- a/Sources/Services/AWSTnb/Sources/AWSTnb/TnbClient.swift +++ b/Sources/Services/AWSTnb/Sources/AWSTnb/TnbClient.swift @@ -68,7 +68,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class TnbClient: ClientRuntime.Client { public static let clientName = "TnbClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: TnbClient.TnbClientConfiguration let serviceName = "tnb" @@ -90,52 +90,54 @@ public class TnbClient: ClientRuntime.Client { } extension TnbClient { + public class TnbClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -160,25 +162,158 @@ extension TnbClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: TnbClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultTnbAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultTnbAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultTnbAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultTnbAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultTnbAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultTnbAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(TnbClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSTranscribe/Sources/AWSTranscribe/TranscribeClient.swift b/Sources/Services/AWSTranscribe/Sources/AWSTranscribe/TranscribeClient.swift index 65874a8e20e..c43127c5116 100644 --- a/Sources/Services/AWSTranscribe/Sources/AWSTranscribe/TranscribeClient.swift +++ b/Sources/Services/AWSTranscribe/Sources/AWSTranscribe/TranscribeClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class TranscribeClient: ClientRuntime.Client { public static let clientName = "TranscribeClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: TranscribeClient.TranscribeClientConfiguration let serviceName = "Transcribe" @@ -87,52 +87,54 @@ public class TranscribeClient: ClientRuntime.Client { } extension TranscribeClient { + public class TranscribeClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension TranscribeClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: TranscribeClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultTranscribeAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultTranscribeAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultTranscribeAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultTranscribeAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultTranscribeAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultTranscribeAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(TranscribeClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSTranscribeStreaming/Sources/AWSTranscribeStreaming/TranscribeStreamingClient.swift b/Sources/Services/AWSTranscribeStreaming/Sources/AWSTranscribeStreaming/TranscribeStreamingClient.swift index 68e817cef55..34fbc420dba 100644 --- a/Sources/Services/AWSTranscribeStreaming/Sources/AWSTranscribeStreaming/TranscribeStreamingClient.swift +++ b/Sources/Services/AWSTranscribeStreaming/Sources/AWSTranscribeStreaming/TranscribeStreamingClient.swift @@ -62,7 +62,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class TranscribeStreamingClient: ClientRuntime.Client { public static let clientName = "TranscribeStreamingClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: TranscribeStreamingClient.TranscribeStreamingClientConfiguration let serviceName = "Transcribe Streaming" @@ -84,52 +84,54 @@ public class TranscribeStreamingClient: ClientRuntime.Client { } extension TranscribeStreamingClient { + public class TranscribeStreamingClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -154,25 +156,158 @@ extension TranscribeStreamingClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: TranscribeStreamingClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultTranscribeStreamingAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultTranscribeStreamingAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultTranscribeStreamingAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultTranscribeStreamingAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultTranscribeStreamingAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultTranscribeStreamingAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(TranscribeStreamingClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSTransfer/Sources/AWSTransfer/TransferClient.swift b/Sources/Services/AWSTransfer/Sources/AWSTransfer/TransferClient.swift index 4ef5808b01d..f02d04e4eab 100644 --- a/Sources/Services/AWSTransfer/Sources/AWSTransfer/TransferClient.swift +++ b/Sources/Services/AWSTransfer/Sources/AWSTransfer/TransferClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class TransferClient: ClientRuntime.Client { public static let clientName = "TransferClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: TransferClient.TransferClientConfiguration let serviceName = "Transfer" @@ -86,52 +86,54 @@ public class TransferClient: ClientRuntime.Client { } extension TransferClient { + public class TransferClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension TransferClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: TransferClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultTransferAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultTransferAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultTransferAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultTransferAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultTransferAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultTransferAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(TransferClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSTranslate/Sources/AWSTranslate/TranslateClient.swift b/Sources/Services/AWSTranslate/Sources/AWSTranslate/TranslateClient.swift index 6efb47f7c59..bdb4f5cf053 100644 --- a/Sources/Services/AWSTranslate/Sources/AWSTranslate/TranslateClient.swift +++ b/Sources/Services/AWSTranslate/Sources/AWSTranslate/TranslateClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class TranslateClient: ClientRuntime.Client { public static let clientName = "TranslateClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: TranslateClient.TranslateClientConfiguration let serviceName = "Translate" @@ -87,52 +87,54 @@ public class TranslateClient: ClientRuntime.Client { } extension TranslateClient { + public class TranslateClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension TranslateClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: TranslateClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultTranslateAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultTranslateAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultTranslateAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultTranslateAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultTranslateAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultTranslateAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(TranslateClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSTrustedAdvisor/Sources/AWSTrustedAdvisor/TrustedAdvisorClient.swift b/Sources/Services/AWSTrustedAdvisor/Sources/AWSTrustedAdvisor/TrustedAdvisorClient.swift index c6833dae846..385a151bb5f 100644 --- a/Sources/Services/AWSTrustedAdvisor/Sources/AWSTrustedAdvisor/TrustedAdvisorClient.swift +++ b/Sources/Services/AWSTrustedAdvisor/Sources/AWSTrustedAdvisor/TrustedAdvisorClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class TrustedAdvisorClient: ClientRuntime.Client { public static let clientName = "TrustedAdvisorClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: TrustedAdvisorClient.TrustedAdvisorClientConfiguration let serviceName = "TrustedAdvisor" @@ -86,52 +86,54 @@ public class TrustedAdvisorClient: ClientRuntime.Client { } extension TrustedAdvisorClient { + public class TrustedAdvisorClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension TrustedAdvisorClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: TrustedAdvisorClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultTrustedAdvisorAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultTrustedAdvisorAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultTrustedAdvisorAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultTrustedAdvisorAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultTrustedAdvisorAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultTrustedAdvisorAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(TrustedAdvisorClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSVPCLattice/Sources/AWSVPCLattice/VPCLatticeClient.swift b/Sources/Services/AWSVPCLattice/Sources/AWSVPCLattice/VPCLatticeClient.swift index f32479ecf0b..54468b2ccac 100644 --- a/Sources/Services/AWSVPCLattice/Sources/AWSVPCLattice/VPCLatticeClient.swift +++ b/Sources/Services/AWSVPCLattice/Sources/AWSVPCLattice/VPCLatticeClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class VPCLatticeClient: ClientRuntime.Client { public static let clientName = "VPCLatticeClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: VPCLatticeClient.VPCLatticeClientConfiguration let serviceName = "VPC Lattice" @@ -87,52 +87,54 @@ public class VPCLatticeClient: ClientRuntime.Client { } extension VPCLatticeClient { + public class VPCLatticeClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension VPCLatticeClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: VPCLatticeClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultVPCLatticeAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultVPCLatticeAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultVPCLatticeAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultVPCLatticeAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultVPCLatticeAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultVPCLatticeAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(VPCLatticeClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSVerifiedPermissions/Sources/AWSVerifiedPermissions/VerifiedPermissionsClient.swift b/Sources/Services/AWSVerifiedPermissions/Sources/AWSVerifiedPermissions/VerifiedPermissionsClient.swift index 123b47b4ca8..3d598564e9b 100644 --- a/Sources/Services/AWSVerifiedPermissions/Sources/AWSVerifiedPermissions/VerifiedPermissionsClient.swift +++ b/Sources/Services/AWSVerifiedPermissions/Sources/AWSVerifiedPermissions/VerifiedPermissionsClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class VerifiedPermissionsClient: ClientRuntime.Client { public static let clientName = "VerifiedPermissionsClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: VerifiedPermissionsClient.VerifiedPermissionsClientConfiguration let serviceName = "VerifiedPermissions" @@ -87,52 +87,54 @@ public class VerifiedPermissionsClient: ClientRuntime.Client { } extension VerifiedPermissionsClient { + public class VerifiedPermissionsClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension VerifiedPermissionsClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: VerifiedPermissionsClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultVerifiedPermissionsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultVerifiedPermissionsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultVerifiedPermissionsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultVerifiedPermissionsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultVerifiedPermissionsAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultVerifiedPermissionsAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(VerifiedPermissionsClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSVoiceID/Sources/AWSVoiceID/VoiceIDClient.swift b/Sources/Services/AWSVoiceID/Sources/AWSVoiceID/VoiceIDClient.swift index 5d451bcd852..b8f5b6a2348 100644 --- a/Sources/Services/AWSVoiceID/Sources/AWSVoiceID/VoiceIDClient.swift +++ b/Sources/Services/AWSVoiceID/Sources/AWSVoiceID/VoiceIDClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class VoiceIDClient: ClientRuntime.Client { public static let clientName = "VoiceIDClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: VoiceIDClient.VoiceIDClientConfiguration let serviceName = "Voice ID" @@ -86,52 +86,54 @@ public class VoiceIDClient: ClientRuntime.Client { } extension VoiceIDClient { + public class VoiceIDClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension VoiceIDClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: VoiceIDClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultVoiceIDAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultVoiceIDAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultVoiceIDAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultVoiceIDAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultVoiceIDAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultVoiceIDAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(VoiceIDClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSWAF/Sources/AWSWAF/WAFClient.swift b/Sources/Services/AWSWAF/Sources/AWSWAF/WAFClient.swift index a0cc7f7661a..d8430dbe0c3 100644 --- a/Sources/Services/AWSWAF/Sources/AWSWAF/WAFClient.swift +++ b/Sources/Services/AWSWAF/Sources/AWSWAF/WAFClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class WAFClient: ClientRuntime.Client { public static let clientName = "WAFClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: WAFClient.WAFClientConfiguration let serviceName = "WAF" @@ -85,52 +85,54 @@ public class WAFClient: ClientRuntime.Client { } extension WAFClient { + public class WAFClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension WAFClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: WAFClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultWAFAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultWAFAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultWAFAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultWAFAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultWAFAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultWAFAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(WAFClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSWAFRegional/Sources/AWSWAFRegional/WAFRegionalClient.swift b/Sources/Services/AWSWAFRegional/Sources/AWSWAFRegional/WAFRegionalClient.swift index c2fede1a889..d8ffe6832f8 100644 --- a/Sources/Services/AWSWAFRegional/Sources/AWSWAFRegional/WAFRegionalClient.swift +++ b/Sources/Services/AWSWAFRegional/Sources/AWSWAFRegional/WAFRegionalClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class WAFRegionalClient: ClientRuntime.Client { public static let clientName = "WAFRegionalClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: WAFRegionalClient.WAFRegionalClientConfiguration let serviceName = "WAF Regional" @@ -85,52 +85,54 @@ public class WAFRegionalClient: ClientRuntime.Client { } extension WAFRegionalClient { + public class WAFRegionalClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension WAFRegionalClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: WAFRegionalClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultWAFRegionalAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultWAFRegionalAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultWAFRegionalAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultWAFRegionalAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultWAFRegionalAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultWAFRegionalAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(WAFRegionalClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSWAFV2/Sources/AWSWAFV2/WAFV2Client.swift b/Sources/Services/AWSWAFV2/Sources/AWSWAFV2/WAFV2Client.swift index 44aed8ad0ae..bed0ae1851c 100644 --- a/Sources/Services/AWSWAFV2/Sources/AWSWAFV2/WAFV2Client.swift +++ b/Sources/Services/AWSWAFV2/Sources/AWSWAFV2/WAFV2Client.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class WAFV2Client: ClientRuntime.Client { public static let clientName = "WAFV2Client" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: WAFV2Client.WAFV2ClientConfiguration let serviceName = "WAFV2" @@ -86,52 +86,54 @@ public class WAFV2Client: ClientRuntime.Client { } extension WAFV2Client { + public class WAFV2ClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension WAFV2Client { self.logger = telemetryProvider.loggerProvider.getLogger(name: WAFV2Client.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultWAFV2AuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultWAFV2AuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultWAFV2AuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultWAFV2AuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultWAFV2AuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultWAFV2AuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(WAFV2Client.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSWellArchitected/Sources/AWSWellArchitected/WellArchitectedClient.swift b/Sources/Services/AWSWellArchitected/Sources/AWSWellArchitected/WellArchitectedClient.swift index 2f5d71eacf8..6701ff51de8 100644 --- a/Sources/Services/AWSWellArchitected/Sources/AWSWellArchitected/WellArchitectedClient.swift +++ b/Sources/Services/AWSWellArchitected/Sources/AWSWellArchitected/WellArchitectedClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class WellArchitectedClient: ClientRuntime.Client { public static let clientName = "WellArchitectedClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: WellArchitectedClient.WellArchitectedClientConfiguration let serviceName = "WellArchitected" @@ -86,52 +86,54 @@ public class WellArchitectedClient: ClientRuntime.Client { } extension WellArchitectedClient { + public class WellArchitectedClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension WellArchitectedClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: WellArchitectedClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultWellArchitectedAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultWellArchitectedAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultWellArchitectedAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultWellArchitectedAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultWellArchitectedAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultWellArchitectedAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(WellArchitectedClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSWisdom/Sources/AWSWisdom/WisdomClient.swift b/Sources/Services/AWSWisdom/Sources/AWSWisdom/WisdomClient.swift index 100c164045a..9d11aececbe 100644 --- a/Sources/Services/AWSWisdom/Sources/AWSWisdom/WisdomClient.swift +++ b/Sources/Services/AWSWisdom/Sources/AWSWisdom/WisdomClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class WisdomClient: ClientRuntime.Client { public static let clientName = "WisdomClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: WisdomClient.WisdomClientConfiguration let serviceName = "Wisdom" @@ -87,52 +87,54 @@ public class WisdomClient: ClientRuntime.Client { } extension WisdomClient { + public class WisdomClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension WisdomClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: WisdomClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultWisdomAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultWisdomAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultWisdomAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultWisdomAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultWisdomAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultWisdomAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(WisdomClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSWorkDocs/Sources/AWSWorkDocs/WorkDocsClient.swift b/Sources/Services/AWSWorkDocs/Sources/AWSWorkDocs/WorkDocsClient.swift index 9492a09b7a5..3dc729d59b3 100644 --- a/Sources/Services/AWSWorkDocs/Sources/AWSWorkDocs/WorkDocsClient.swift +++ b/Sources/Services/AWSWorkDocs/Sources/AWSWorkDocs/WorkDocsClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class WorkDocsClient: ClientRuntime.Client { public static let clientName = "WorkDocsClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: WorkDocsClient.WorkDocsClientConfiguration let serviceName = "WorkDocs" @@ -87,52 +87,54 @@ public class WorkDocsClient: ClientRuntime.Client { } extension WorkDocsClient { + public class WorkDocsClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension WorkDocsClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: WorkDocsClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultWorkDocsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultWorkDocsAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultWorkDocsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultWorkDocsAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultWorkDocsAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultWorkDocsAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(WorkDocsClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSWorkMail/Sources/AWSWorkMail/WorkMailClient.swift b/Sources/Services/AWSWorkMail/Sources/AWSWorkMail/WorkMailClient.swift index 390676d7adf..76bf907922f 100644 --- a/Sources/Services/AWSWorkMail/Sources/AWSWorkMail/WorkMailClient.swift +++ b/Sources/Services/AWSWorkMail/Sources/AWSWorkMail/WorkMailClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class WorkMailClient: ClientRuntime.Client { public static let clientName = "WorkMailClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: WorkMailClient.WorkMailClientConfiguration let serviceName = "WorkMail" @@ -87,52 +87,54 @@ public class WorkMailClient: ClientRuntime.Client { } extension WorkMailClient { + public class WorkMailClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension WorkMailClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: WorkMailClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultWorkMailAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultWorkMailAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultWorkMailAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultWorkMailAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultWorkMailAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultWorkMailAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(WorkMailClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSWorkMailMessageFlow/Sources/AWSWorkMailMessageFlow/WorkMailMessageFlowClient.swift b/Sources/Services/AWSWorkMailMessageFlow/Sources/AWSWorkMailMessageFlow/WorkMailMessageFlowClient.swift index d788ca2cb2f..cf48515682d 100644 --- a/Sources/Services/AWSWorkMailMessageFlow/Sources/AWSWorkMailMessageFlow/WorkMailMessageFlowClient.swift +++ b/Sources/Services/AWSWorkMailMessageFlow/Sources/AWSWorkMailMessageFlow/WorkMailMessageFlowClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class WorkMailMessageFlowClient: ClientRuntime.Client { public static let clientName = "WorkMailMessageFlowClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: WorkMailMessageFlowClient.WorkMailMessageFlowClientConfiguration let serviceName = "WorkMailMessageFlow" @@ -85,52 +85,54 @@ public class WorkMailMessageFlowClient: ClientRuntime.Client { } extension WorkMailMessageFlowClient { + public class WorkMailMessageFlowClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension WorkMailMessageFlowClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: WorkMailMessageFlowClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultWorkMailMessageFlowAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultWorkMailMessageFlowAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultWorkMailMessageFlowAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultWorkMailMessageFlowAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultWorkMailMessageFlowAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultWorkMailMessageFlowAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(WorkMailMessageFlowClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSWorkSpaces/Sources/AWSWorkSpaces/WorkSpacesClient.swift b/Sources/Services/AWSWorkSpaces/Sources/AWSWorkSpaces/WorkSpacesClient.swift index 5eb43dbfaa3..73028f40eb7 100644 --- a/Sources/Services/AWSWorkSpaces/Sources/AWSWorkSpaces/WorkSpacesClient.swift +++ b/Sources/Services/AWSWorkSpaces/Sources/AWSWorkSpaces/WorkSpacesClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class WorkSpacesClient: ClientRuntime.Client { public static let clientName = "WorkSpacesClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: WorkSpacesClient.WorkSpacesClientConfiguration let serviceName = "WorkSpaces" @@ -86,52 +86,54 @@ public class WorkSpacesClient: ClientRuntime.Client { } extension WorkSpacesClient { + public class WorkSpacesClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension WorkSpacesClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: WorkSpacesClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultWorkSpacesAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultWorkSpacesAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultWorkSpacesAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultWorkSpacesAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultWorkSpacesAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultWorkSpacesAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(WorkSpacesClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSWorkSpacesThinClient/Sources/AWSWorkSpacesThinClient/WorkSpacesThinClientClient.swift b/Sources/Services/AWSWorkSpacesThinClient/Sources/AWSWorkSpacesThinClient/WorkSpacesThinClientClient.swift index 6c27d53eceb..2f3b515ba59 100644 --- a/Sources/Services/AWSWorkSpacesThinClient/Sources/AWSWorkSpacesThinClient/WorkSpacesThinClientClient.swift +++ b/Sources/Services/AWSWorkSpacesThinClient/Sources/AWSWorkSpacesThinClient/WorkSpacesThinClientClient.swift @@ -64,7 +64,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class WorkSpacesThinClientClient: ClientRuntime.Client { public static let clientName = "WorkSpacesThinClientClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: WorkSpacesThinClientClient.WorkSpacesThinClientClientConfiguration let serviceName = "WorkSpaces Thin Client" @@ -86,52 +86,54 @@ public class WorkSpacesThinClientClient: ClientRuntime.Client { } extension WorkSpacesThinClientClient { + public class WorkSpacesThinClientClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -156,25 +158,158 @@ extension WorkSpacesThinClientClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: WorkSpacesThinClientClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultWorkSpacesThinClientAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultWorkSpacesThinClientAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultWorkSpacesThinClientAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultWorkSpacesThinClientAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultWorkSpacesThinClientAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultWorkSpacesThinClientAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(WorkSpacesThinClientClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSWorkSpacesWeb/Sources/AWSWorkSpacesWeb/WorkSpacesWebClient.swift b/Sources/Services/AWSWorkSpacesWeb/Sources/AWSWorkSpacesWeb/WorkSpacesWebClient.swift index c08028f87ad..129f68cc932 100644 --- a/Sources/Services/AWSWorkSpacesWeb/Sources/AWSWorkSpacesWeb/WorkSpacesWebClient.swift +++ b/Sources/Services/AWSWorkSpacesWeb/Sources/AWSWorkSpacesWeb/WorkSpacesWebClient.swift @@ -65,7 +65,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class WorkSpacesWebClient: ClientRuntime.Client { public static let clientName = "WorkSpacesWebClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: WorkSpacesWebClient.WorkSpacesWebClientConfiguration let serviceName = "WorkSpaces Web" @@ -87,52 +87,54 @@ public class WorkSpacesWebClient: ClientRuntime.Client { } extension WorkSpacesWebClient { + public class WorkSpacesWebClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -157,25 +159,158 @@ extension WorkSpacesWebClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: WorkSpacesWebClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultWorkSpacesWebAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultWorkSpacesWebAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultWorkSpacesWebAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultWorkSpacesWebAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) } - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultWorkSpacesWebAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultWorkSpacesWebAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(WorkSpacesWebClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } diff --git a/Sources/Services/AWSXRay/Sources/AWSXRay/XRayClient.swift b/Sources/Services/AWSXRay/Sources/AWSXRay/XRayClient.swift index 6cb1734eee7..19609499051 100644 --- a/Sources/Services/AWSXRay/Sources/AWSXRay/XRayClient.swift +++ b/Sources/Services/AWSXRay/Sources/AWSXRay/XRayClient.swift @@ -63,7 +63,7 @@ import typealias SmithyHTTPAuthAPI.AuthSchemes public class XRayClient: ClientRuntime.Client { public static let clientName = "XRayClient" - public static let version = "1.0.53" + public static let version = "1.0.54" let client: ClientRuntime.SdkHttpClient let config: XRayClient.XRayClientConfiguration let serviceName = "XRay" @@ -85,52 +85,54 @@ public class XRayClient: ClientRuntime.Client { } extension XRayClient { + public class XRayClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ maxAttempts: Swift.Int?, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: SmithyHTTPAPI.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, _ interceptorProviders: [ClientRuntime.InterceptorProvider], _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]) { + private init( + _ useFIPS: Swift.Bool?, + _ useDualStack: Swift.Bool?, + _ appID: Swift.String?, + _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, + _ awsRetryMode: AWSClientRuntime.AWSRetryMode, + _ maxAttempts: Swift.Int?, + _ region: Swift.String?, + _ signingRegion: Swift.String?, + _ endpointResolver: EndpointResolver, + _ telemetryProvider: ClientRuntime.TelemetryProvider, + _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, + _ clientLogMode: ClientRuntime.ClientLogMode, + _ endpoint: Swift.String?, + _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, + _ httpClientEngine: SmithyHTTPAPI.HTTPClient, + _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, + _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, + _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, + _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, + _ interceptorProviders: [ClientRuntime.InterceptorProvider], + _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] + ) { self.useFIPS = useFIPS self.useDualStack = useDualStack self.appID = appID @@ -155,25 +157,158 @@ extension XRayClient { self.logger = telemetryProvider.loggerProvider.getLogger(name: XRayClient.clientName) } - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultXRayAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) - } - - public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, maxAttempts: Swift.Int? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil) async throws { - self.init(useFIPS, useDualStack, try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), maxAttempts, try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], authSchemeResolver ?? DefaultXRayAuthSchemeResolver(), bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), interceptorProviders ?? [], httpInterceptorProviders ?? []) + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + region, + signingRegion, + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultXRayAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) + } + + public convenience init( + useFIPS: Swift.Bool? = nil, + useDualStack: Swift.Bool? = nil, + appID: Swift.String? = nil, + awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, + awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, + maxAttempts: Swift.Int? = nil, + region: Swift.String? = nil, + signingRegion: Swift.String? = nil, + endpointResolver: EndpointResolver? = nil, + telemetryProvider: ClientRuntime.TelemetryProvider? = nil, + retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, + clientLogMode: ClientRuntime.ClientLogMode? = nil, + endpoint: Swift.String? = nil, + idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, + httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, + httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, + authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, + authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, + bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, + interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, + httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil + ) async throws { + self.init( + useFIPS, + useDualStack, + try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), + try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + maxAttempts, + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), + try endpointResolver ?? DefaultEndpointResolver(), + telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, + try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), + clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), + endpoint, + idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), + httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), + authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], + authSchemeResolver ?? DefaultXRayAuthSchemeResolver(), + bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + interceptorProviders ?? [], + httpInterceptorProviders ?? [] + ) } public convenience required init() async throws { - try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, maxAttempts: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil, bearerTokenIdentityResolver: nil, interceptorProviders: nil, httpInterceptorProviders: nil) - } - - public convenience init(region: String) throws { - self.init(nil, nil, try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode(), nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), AWSClientConfigDefaultsProvider.httpClientEngine(), AWSClientConfigDefaultsProvider.httpClientConfiguration(), [AWSSDKHTTPAuth.SigV4AuthScheme()], DefaultXRayAuthSchemeResolver(), SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), [], []) + try await self.init( + useFIPS: nil, + useDualStack: nil, + appID: nil, + awsCredentialIdentityResolver: nil, + awsRetryMode: nil, + maxAttempts: nil, + region: nil, + signingRegion: nil, + endpointResolver: nil, + telemetryProvider: nil, + retryStrategyOptions: nil, + clientLogMode: nil, + endpoint: nil, + idempotencyTokenGenerator: nil, + httpClientEngine: nil, + httpClientConfiguration: nil, + authSchemes: nil, + authSchemeResolver: nil, + bearerTokenIdentityResolver: nil, + interceptorProviders: nil, + httpInterceptorProviders: nil + ) + } + + public convenience init(region: Swift.String) throws { + self.init( + nil, + nil, + try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), + try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), + try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), + nil, + region, + region, + try DefaultEndpointResolver(), + ClientRuntime.DefaultTelemetry.provider, + try AWSClientConfigDefaultsProvider.retryStrategyOptions(), + AWSClientConfigDefaultsProvider.clientLogMode(), + nil, + AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), + AWSClientConfigDefaultsProvider.httpClientEngine(), + AWSClientConfigDefaultsProvider.httpClientConfiguration(), + [AWSSDKHTTPAuth.SigV4AuthScheme()], + DefaultXRayAuthSchemeResolver(), + SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), + [], + [] + ) } public var partitionID: String? { return "\(XRayClient.clientName) - \(region ?? "")" } + public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { self.interceptorProviders.append(provider) } From c1315dfe897a4c4224a0b9e3e814e1f2594b58cf Mon Sep 17 00:00:00 2001 From: Josh Elkins Date: Fri, 6 Dec 2024 13:10:35 -0600 Subject: [PATCH 02/19] feat: Account ID-based endpoints --- .../EndpointResolverMiddleware.swift | 23 +++++++++---------- .../codegen/AWSHTTPProtocolCustomizations.kt | 2 +- .../aws/swift/codegen/AWSServiceConfig.kt | 1 - .../OperationEndpointResolverMiddleware.kt | 19 ++++++++++----- .../swiftmodules/AWSClientRuntimeTypes.kt | 2 +- sdk.properties | 1 + 6 files changed, 27 insertions(+), 21 deletions(-) diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/EndpointResolverMiddleware.swift b/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/EndpointResolverMiddleware.swift index 670374d8d6f..6d40fb20f42 100644 --- a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/EndpointResolverMiddleware.swift +++ b/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/EndpointResolverMiddleware.swift @@ -18,27 +18,26 @@ import enum ClientRuntime.EndpointsAuthScheme import protocol ClientRuntime.EndpointsAuthSchemeResolver import protocol ClientRuntime.EndpointsRequestContextProviding -public struct EndpointResolverMiddleware { +@_spi(AWSEndpointResolverMiddleware) +public struct AWSEndpointResolverMiddleware { public let id: Swift.String = "EndpointResolverMiddleware" - - let endpointResolverBlock: (Params) throws -> Endpoint - - let endpointParams: Params - + let paramsBlock: (Context) throws -> Params + let resolverBlock: (Params) throws -> Endpoint let authSchemeResolver: ClientRuntime.EndpointsAuthSchemeResolver public init( - endpointResolverBlock: @escaping (Params) throws -> Endpoint, - endpointParams: Params, + paramsBlock: @escaping (Context) throws -> Params, + resolverBlock: @escaping (Params) throws -> Endpoint, authSchemeResolver: EndpointsAuthSchemeResolver = DefaultEndpointsAuthSchemeResolver() ) { - self.endpointResolverBlock = endpointResolverBlock - self.endpointParams = endpointParams + self.paramsBlock = paramsBlock + self.resolverBlock = resolverBlock self.authSchemeResolver = authSchemeResolver } } -extension EndpointResolverMiddleware: ApplyEndpoint { +extension AWSEndpointResolverMiddleware: ApplyEndpoint { + public func apply( request: SmithyHTTPAPI.HTTPRequest, selectedAuthScheme: SelectedAuthScheme?, @@ -46,7 +45,7 @@ extension EndpointResolverMiddleware: ApplyEndpoint { ) async throws -> SmithyHTTPAPI.HTTPRequest { let builder = request.toBuilder() - let endpoint = try endpointResolverBlock(endpointParams) + let endpoint = try resolverBlock(paramsBlock(attributes)) var signingName: String? var signingAlgorithm: String? diff --git a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHTTPProtocolCustomizations.kt b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHTTPProtocolCustomizations.kt index 5e03894b2b9..062ff8cb150 100644 --- a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHTTPProtocolCustomizations.kt +++ b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHTTPProtocolCustomizations.kt @@ -67,7 +67,7 @@ abstract class AWSHTTPProtocolCustomizations : DefaultHTTPProtocolCustomizations return AWSHttpProtocolServiceClient(ctx, writer, serviceConfig) } - override val endpointMiddlewareSymbol: Symbol = AWSClientRuntimeTypes.Core.EndpointResolverMiddleware + override val endpointMiddlewareSymbol: Symbol = AWSClientRuntimeTypes.Core.AWSEndpointResolverMiddleware override val unknownServiceErrorSymbol: Symbol = AWSClientRuntimeTypes.Core.UnknownAWSHTTPServiceError } diff --git a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSServiceConfig.kt b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSServiceConfig.kt index 294d88c00f5..32f541d8a56 100644 --- a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSServiceConfig.kt +++ b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSServiceConfig.kt @@ -21,7 +21,6 @@ import software.amazon.smithy.swift.codegen.utils.toLowerCamelCase const val ENDPOINT_RESOLVER = "endpointResolver" const val AUTH_SCHEME_RESOLVER = "authSchemeResolver" -const val ENDPOINT_PARAMS = "endpointParams" class AWSServiceConfig(writer: SwiftWriter, val ctx: ProtocolGenerator.GenerationContext) : ServiceConfig(writer, ctx.symbolProvider.toSymbol(ctx.service).name, ctx.service.sdkId) { diff --git a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/middleware/OperationEndpointResolverMiddleware.kt b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/middleware/OperationEndpointResolverMiddleware.kt index 47f7a97edd4..ed52c633930 100644 --- a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/middleware/OperationEndpointResolverMiddleware.kt +++ b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/middleware/OperationEndpointResolverMiddleware.kt @@ -49,10 +49,11 @@ class OperationEndpointResolverMiddleware( override fun render(ctx: ProtocolGenerator.GenerationContext, writer: SwiftWriter, op: OperationShape, operationStackName: String) { renderEndpointParams(ctx, writer, op) + renderResolverBlock(writer) // Write code that saves endpoint params to middleware context for use in auth scheme middleware when using rules-based auth scheme resolvers if (AuthSchemeResolverGenerator.usesRulesBasedAuthResolver(ctx)) { - writer.write("context.set(key: \$N(name: \"EndpointParams\"), value: endpointParams)", SmithyTypes.AttributeKey) + writer.write("context.set(key: \$N(name: \"EndpointParams\"), value: paramsBlock(context))", SmithyTypes.AttributeKey) } super.renderSpecific(ctx, writer, op, operationStackName, "applyEndpoint") @@ -65,14 +66,17 @@ class OperationEndpointResolverMiddleware( ) { val output = MiddlewareShapeUtils.outputSymbol(ctx.symbolProvider, ctx.model, op) writer.write( - "\$N<\$N, EndpointParams>(endpointResolverBlock: { [config] in try config.endpointResolver.resolve(params: \$\$0) }, endpointParams: endpointParams)", + "\$N<\$N, EndpointParams>(paramsBlock: paramsBlock, resolverBlock: resolverBlock)", endpointResolverMiddlewareSymbol, output ) } + private fun renderResolverBlock(writer: SwiftWriter) { + writer.write("let resolverBlock = { [config] in try config.endpointResolver.resolve(params: \$\$0) }") + } + private fun renderEndpointParams(ctx: ProtocolGenerator.GenerationContext, writer: SwiftWriter, op: OperationShape) { - val outputError = MiddlewareShapeUtils.outputErrorSymbol(op) val params = mutableListOf() ctx.service.getTrait()?.ruleSet?.let { node -> val ruleSet = EndpointRuleSet.fromNode(node) @@ -96,7 +100,6 @@ class OperationEndpointResolverMiddleware( operationContextParams[param.name.toString()], clientContextParams[param.name.toString()], writer, - outputError ) value?.let { params.add("$memberName: $it") @@ -104,7 +107,9 @@ class OperationEndpointResolverMiddleware( } } - writer.write("let endpointParams = EndpointParams(${params.joinToString(separator = ", ")})") + writer.openBlock("let paramsBlock = { [config] (context: \$N) in", "}", SmithyTypes.Context) { + writer.write("EndpointParams(${params.joinToString(separator = ", ")})") + } } /** @@ -125,7 +130,6 @@ class OperationEndpointResolverMiddleware( operationContextParam: OperationContextParamDefinition?, clientContextParam: ClientContextParamDefinition?, writer: SwiftWriter, - outputError: Symbol ): String? { return when { staticContextParam != null -> { @@ -169,6 +173,9 @@ class OperationEndpointResolverMiddleware( } clientContextParam != null -> { when { + param.name.toString() == "AccountIdEndpointMode" -> { + "config.accountIdEndpointMode?.rawValue" + } param.default.isPresent -> { "config.${param.name.toString().toLowerCamelCase()} ?? ${param.defaultValueLiteral}" } diff --git a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/swiftmodules/AWSClientRuntimeTypes.kt b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/swiftmodules/AWSClientRuntimeTypes.kt index 1596ff8632b..ca95478d050 100644 --- a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/swiftmodules/AWSClientRuntimeTypes.kt +++ b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/swiftmodules/AWSClientRuntimeTypes.kt @@ -32,7 +32,7 @@ object AWSClientRuntimeTypes { object Core { val AWSUserAgentMetadata = runtimeSymbol("AWSUserAgentMetadata", SwiftDeclaration.STRUCT) val UserAgentMiddleware = runtimeSymbol("UserAgentMiddleware", SwiftDeclaration.STRUCT) - val EndpointResolverMiddleware = runtimeSymbol("EndpointResolverMiddleware", SwiftDeclaration.STRUCT) + val AWSEndpointResolverMiddleware = runtimeSymbol("AWSEndpointResolverMiddleware", SwiftDeclaration.STRUCT, listOf("AWSEndpointResolverMiddleware")) val UnknownAWSHTTPServiceError = runtimeSymbol("UnknownAWSHTTPServiceError", SwiftDeclaration.STRUCT, listOf("UnknownAWSHTTPServiceError")) val AWSServiceError = runtimeSymbol("AWSServiceError", SwiftDeclaration.PROTOCOL) val Sha256TreeHashMiddleware = runtimeSymbol("Sha256TreeHashMiddleware", SwiftDeclaration.STRUCT) diff --git a/sdk.properties b/sdk.properties index 0ecd6cd91c8..7fdde89b7e2 100644 --- a/sdk.properties +++ b/sdk.properties @@ -4,3 +4,4 @@ # Use this line to exclude one or more AWS services: # excludeModels=s3,sts,dynamodb +# onlyIncludeModels=dynamodb From 6aa9a90c4ab7a8106d0f95df84ba8f3fb3f49350 Mon Sep 17 00:00:00 2001 From: Josh Elkins Date: Fri, 6 Dec 2024 13:53:09 -0600 Subject: [PATCH 03/19] Fix tests --- ...perationEndpointResolverMiddlewareTests.kt | 9 ++++-- .../swift/codegen/PresignerGeneratorTests.kt | 30 +++++++++++++------ .../awsquery/AWSQueryOperationStackTest.kt | 7 +++-- 3 files changed, 32 insertions(+), 14 deletions(-) diff --git a/codegen/smithy-aws-swift-codegen/src/test/kotlin/software/amazon/smithy/aws/swift/codegen/OperationEndpointResolverMiddlewareTests.kt b/codegen/smithy-aws-swift-codegen/src/test/kotlin/software/amazon/smithy/aws/swift/codegen/OperationEndpointResolverMiddlewareTests.kt index 99203dfff99..bbf2265b6f7 100644 --- a/codegen/smithy-aws-swift-codegen/src/test/kotlin/software/amazon/smithy/aws/swift/codegen/OperationEndpointResolverMiddlewareTests.kt +++ b/codegen/smithy-aws-swift-codegen/src/test/kotlin/software/amazon/smithy/aws/swift/codegen/OperationEndpointResolverMiddlewareTests.kt @@ -21,7 +21,7 @@ class OperationEndpointResolverMiddlewareTests { val writer = SwiftWriter("smithy.example") val context = setupTests("endpoints.smithy", "smithy.example#ExampleService") val operation = context.ctx.model.operationShapes.toList().first { it.id.name == "GetThing" } - val middleware = OperationEndpointResolverMiddleware(context.ctx, AWSClientRuntimeTypes.Core.EndpointResolverMiddleware) + val middleware = OperationEndpointResolverMiddleware(context.ctx, AWSClientRuntimeTypes.Core.AWSEndpointResolverMiddleware) middleware.render(context.ctx, writer, operation, "operationStack") var contents = writer.toString() val expected = """ @@ -50,8 +50,11 @@ let projection2: [Swift.String]? = objects2?.compactMap { original in let id = original.id return id } -let endpointParams = EndpointParams(boolBar: true, boolBaz: input.fuzz, boolFoo: config.boolFoo, endpoint: config.endpoint, flattenedArray: projection, keysFunctionArray: keys, region: region, stringArrayBar: ["five", "six", "seven"], stringBar: "some value", stringBaz: input.buzz, stringFoo: config.stringFoo, subfield: subfield2, wildcardProjectionArray: projection2) -builder.applyEndpoint(AWSClientRuntime.EndpointResolverMiddleware(endpointResolverBlock: { [config] in try config.endpointResolver.resolve(params: ${'$'}0) }, endpointParams: endpointParams)) +let paramsBlock = { [config] (context: Smithy.Context) in + EndpointParams(boolBar: true, boolBaz: input.fuzz, boolFoo: config.boolFoo, endpoint: config.endpoint, flattenedArray: projection, keysFunctionArray: keys, region: region, stringArrayBar: ["five", "six", "seven"], stringBar: "some value", stringBaz: input.buzz, stringFoo: config.stringFoo, subfield: subfield2, wildcardProjectionArray: projection2) +} +let resolverBlock = { [config] in try config.endpointResolver.resolve(params: ${'$'}0) } +builder.applyEndpoint(AWSClientRuntime.AWSEndpointResolverMiddleware(paramsBlock: paramsBlock, resolverBlock: resolverBlock)) """ contents.shouldContainOnlyOnce(expected) } diff --git a/codegen/smithy-aws-swift-codegen/src/test/kotlin/software/amazon/smithy/aws/swift/codegen/PresignerGeneratorTests.kt b/codegen/smithy-aws-swift-codegen/src/test/kotlin/software/amazon/smithy/aws/swift/codegen/PresignerGeneratorTests.kt index f77543ec680..ff21fe1123b 100644 --- a/codegen/smithy-aws-swift-codegen/src/test/kotlin/software/amazon/smithy/aws/swift/codegen/PresignerGeneratorTests.kt +++ b/codegen/smithy-aws-swift-codegen/src/test/kotlin/software/amazon/smithy/aws/swift/codegen/PresignerGeneratorTests.kt @@ -53,8 +53,11 @@ extension GetFooInput { builder.retryStrategy(SmithyRetries.DefaultRetryStrategy(options: config.retryStrategyOptions)) builder.retryErrorInfoProvider(AWSClientRuntime.AWSRetryErrorInfoProvider.errorInfo(for:)) builder.applySigner(ClientRuntime.SignerMiddleware()) - let endpointParams = EndpointParams() - builder.applyEndpoint(AWSClientRuntime.EndpointResolverMiddleware(endpointResolverBlock: { [config] in try config.endpointResolver.resolve(params: ${'$'}0) }, endpointParams: endpointParams)) + let paramsBlock = { [config] (context: Smithy.Context) in + EndpointParams() + } + let resolverBlock = { [config] in try config.endpointResolver.resolve(params: ${'$'}0) } + builder.applyEndpoint(AWSClientRuntime.AWSEndpointResolverMiddleware(paramsBlock: paramsBlock, resolverBlock: resolverBlock)) builder.interceptors.add(AWSClientRuntime.UserAgentMiddleware(serviceID: serviceName, version: ExampleClient.version, config: config)) builder.selectAuthScheme(ClientRuntime.AuthSchemeMiddleware()) var metricsAttributes = Smithy.Attributes() @@ -125,8 +128,11 @@ extension PostFooInput { builder.retryStrategy(SmithyRetries.DefaultRetryStrategy(options: config.retryStrategyOptions)) builder.retryErrorInfoProvider(AWSClientRuntime.AWSRetryErrorInfoProvider.errorInfo(for:)) builder.applySigner(ClientRuntime.SignerMiddleware()) - let endpointParams = EndpointParams() - builder.applyEndpoint(AWSClientRuntime.EndpointResolverMiddleware(endpointResolverBlock: { [config] in try config.endpointResolver.resolve(params: ${'$'}0) }, endpointParams: endpointParams)) + let paramsBlock = { [config] (context: Smithy.Context) in + EndpointParams() + } + let resolverBlock = { [config] in try config.endpointResolver.resolve(params: ${'$'}0) } + builder.applyEndpoint(AWSClientRuntime.AWSEndpointResolverMiddleware(paramsBlock: paramsBlock, resolverBlock: resolverBlock)) builder.interceptors.add(AWSClientRuntime.UserAgentMiddleware(serviceID: serviceName, version: ExampleClient.version, config: config)) builder.selectAuthScheme(ClientRuntime.AuthSchemeMiddleware()) var metricsAttributes = Smithy.Attributes() @@ -197,8 +203,11 @@ extension PutFooInput { builder.retryStrategy(SmithyRetries.DefaultRetryStrategy(options: config.retryStrategyOptions)) builder.retryErrorInfoProvider(AWSClientRuntime.AWSRetryErrorInfoProvider.errorInfo(for:)) builder.applySigner(ClientRuntime.SignerMiddleware()) - let endpointParams = EndpointParams() - builder.applyEndpoint(AWSClientRuntime.EndpointResolverMiddleware(endpointResolverBlock: { [config] in try config.endpointResolver.resolve(params: ${'$'}0) }, endpointParams: endpointParams)) + let paramsBlock = { [config] (context: Smithy.Context) in + EndpointParams() + } + let resolverBlock = { [config] in try config.endpointResolver.resolve(params: ${'$'}0) } + builder.applyEndpoint(AWSClientRuntime.AWSEndpointResolverMiddleware(paramsBlock: paramsBlock, resolverBlock: resolverBlock)) builder.interceptors.add(AWSClientRuntime.UserAgentMiddleware(serviceID: serviceName, version: ExampleClient.version, config: config)) builder.selectAuthScheme(ClientRuntime.AuthSchemeMiddleware()) var metricsAttributes = Smithy.Attributes() @@ -269,9 +278,12 @@ extension PutObjectInput { builder.retryStrategy(SmithyRetries.DefaultRetryStrategy(options: config.retryStrategyOptions)) builder.retryErrorInfoProvider(AWSClientRuntime.AWSRetryErrorInfoProvider.errorInfo(for:)) builder.applySigner(ClientRuntime.SignerMiddleware()) - let endpointParams = EndpointParams() - context.set(key: Smithy.AttributeKey(name: "EndpointParams"), value: endpointParams) - builder.applyEndpoint(AWSClientRuntime.EndpointResolverMiddleware(endpointResolverBlock: { [config] in try config.endpointResolver.resolve(params: ${'$'}0) }, endpointParams: endpointParams)) + let paramsBlock = { [config] (context: Smithy.Context) in + EndpointParams() + } + let resolverBlock = { [config] in try config.endpointResolver.resolve(params: ${'$'}0) } + context.set(key: Smithy.AttributeKey(name: "EndpointParams"), value: paramsBlock(context)) + builder.applyEndpoint(AWSClientRuntime.AWSEndpointResolverMiddleware(paramsBlock: paramsBlock, resolverBlock: resolverBlock)) builder.interceptors.add(AWSClientRuntime.UserAgentMiddleware(serviceID: serviceName, version: S3Client.version, config: config)) builder.selectAuthScheme(ClientRuntime.AuthSchemeMiddleware()) var metricsAttributes = Smithy.Attributes() diff --git a/codegen/smithy-aws-swift-codegen/src/test/kotlin/software/amazon/smithy/aws/swift/codegen/awsquery/AWSQueryOperationStackTest.kt b/codegen/smithy-aws-swift-codegen/src/test/kotlin/software/amazon/smithy/aws/swift/codegen/awsquery/AWSQueryOperationStackTest.kt index 2eaff2bd73c..a4a6407f441 100644 --- a/codegen/smithy-aws-swift-codegen/src/test/kotlin/software/amazon/smithy/aws/swift/codegen/awsquery/AWSQueryOperationStackTest.kt +++ b/codegen/smithy-aws-swift-codegen/src/test/kotlin/software/amazon/smithy/aws/swift/codegen/awsquery/AWSQueryOperationStackTest.kt @@ -36,8 +36,11 @@ class AWSQueryOperationStackTest { builder.retryStrategy(SmithyRetries.DefaultRetryStrategy(options: config.retryStrategyOptions)) builder.retryErrorInfoProvider(AWSClientRuntime.AWSRetryErrorInfoProvider.errorInfo(for:)) builder.applySigner(ClientRuntime.SignerMiddleware()) - let endpointParams = EndpointParams() - builder.applyEndpoint(AWSClientRuntime.EndpointResolverMiddleware(endpointResolverBlock: { [config] in try config.endpointResolver.resolve(params: ${'$'}0) }, endpointParams: endpointParams)) + let paramsBlock = { [config] (context: Smithy.Context) in + EndpointParams() + } + let resolverBlock = { [config] in try config.endpointResolver.resolve(params: ${'$'}0) } + builder.applyEndpoint(AWSClientRuntime.AWSEndpointResolverMiddleware(paramsBlock: paramsBlock, resolverBlock: resolverBlock)) builder.interceptors.add(AWSClientRuntime.UserAgentMiddleware(serviceID: serviceName, version: QueryProtocolClient.version, config: config)) builder.serialize(ClientRuntime.BodyMiddleware(rootNodeInfo: "", inputWritingClosure: NoInputAndOutputInput.write(value:to:))) builder.interceptors.add(ClientRuntime.ContentTypeMiddleware(contentType: "application/x-www-form-urlencoded")) From cada066de467aa4b3e5969e72bb1bed35e06285b Mon Sep 17 00:00:00 2001 From: Josh Elkins Date: Fri, 6 Dec 2024 17:26:54 -0600 Subject: [PATCH 04/19] Wire up account ID --- .../Endpoints/AccountIDEndpointMode.swift | 27 +++++++++++++++++++ .../codegen/AWSHttpProtocolServiceClient.kt | 19 ++++++++++--- .../OperationEndpointResolverMiddleware.kt | 25 ++++++++++------- .../swiftmodules/AWSClientRuntimeTypes.kt | 1 + 4 files changed, 59 insertions(+), 13 deletions(-) create mode 100644 Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/AccountIDEndpointMode.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/AccountIDEndpointMode.swift b/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/AccountIDEndpointMode.swift new file mode 100644 index 00000000000..ad31ec88ce3 --- /dev/null +++ b/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/AccountIDEndpointMode.swift @@ -0,0 +1,27 @@ +// +// Copyright Amazon.com Inc. or its affiliates. +// All Rights Reserved. +// +// SPDX-License-Identifier: Apache-2.0 +// + +/// Determines how & whether an account ID-based endpoint will be used for requests. +public enum AccountIDEndpointMode: String { + // Note : these case names match string values for the accountIdEndpointMode endpoint param. + // Do not rename them + + /// An account ID-based endpoint will be used if an account ID is available. + /// + /// This is the default mode. + case preferred // the default case + + /// An account ID-based endpoint will never be used. + /// + /// The request will fail if a non-account ID-based endpoint is not available. + case disabled + + /// An account ID-based endpoint will always be used. + /// + /// The request will fail if an account ID-based endpoint cannot be constructed. + case required +} diff --git a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHttpProtocolServiceClient.kt b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHttpProtocolServiceClient.kt index b21859ac6d2..e545c857b97 100644 --- a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHttpProtocolServiceClient.kt +++ b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHttpProtocolServiceClient.kt @@ -5,6 +5,7 @@ package software.amazon.smithy.aws.swift.codegen +import software.amazon.smithy.aws.swift.codegen.swiftmodules.AWSClientRuntimeTypes import software.amazon.smithy.aws.swift.codegen.swiftmodules.AWSSDKIdentityTypes import software.amazon.smithy.codegen.core.Symbol import software.amazon.smithy.model.traits.HttpBearerAuthTrait @@ -44,8 +45,8 @@ class AWSHttpProtocolServiceClient( } override fun overrideConfigProperties(properties: List): List { - return properties.map { - when (it.name) { + return properties.map { property -> + when (property.name) { "authSchemeResolver" -> { ConfigProperty("authSchemeResolver", SmithyHTTPAuthAPITypes.AuthSchemeResolver, authSchemeResolverDefaultProvider) } @@ -61,7 +62,7 @@ class AWSHttpProtocolServiceClient( true ) } else { - it + property } } "retryStrategyOptions" -> { @@ -100,7 +101,7 @@ class AWSHttpProtocolServiceClient( { it.format("AWSClientConfigDefaultsProvider.httpClientConfiguration()") }, ) } - else -> it + else -> property } } } @@ -152,4 +153,14 @@ class AWSHttpProtocolServiceClient( false, false ) + + override fun customizedClientConfigProperty(property: ConfigProperty): ConfigProperty? { + return when (property.name) { + "accountId" -> null + "accountIdEndpointMode" -> { + ConfigProperty("accountIdEndpointMode", AWSClientRuntimeTypes.Core.AccountIDEndpointMode.toOptional()) + } + else -> property + } + } } diff --git a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/middleware/OperationEndpointResolverMiddleware.kt b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/middleware/OperationEndpointResolverMiddleware.kt index ed52c633930..de3592743b1 100644 --- a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/middleware/OperationEndpointResolverMiddleware.kt +++ b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/middleware/OperationEndpointResolverMiddleware.kt @@ -31,6 +31,7 @@ import software.amazon.smithy.swift.codegen.integration.ProtocolGenerator import software.amazon.smithy.swift.codegen.integration.middlewares.handlers.MiddlewareShapeUtils import software.amazon.smithy.swift.codegen.middleware.MiddlewareRenderable import software.amazon.smithy.swift.codegen.model.getTrait +import software.amazon.smithy.swift.codegen.swiftmodules.SmithyIdentityTypes import software.amazon.smithy.swift.codegen.swiftmodules.SmithyTypes import software.amazon.smithy.swift.codegen.utils.toLowerCamelCase import software.amazon.smithy.swift.codegen.waiters.JMESPathVisitor @@ -49,11 +50,13 @@ class OperationEndpointResolverMiddleware( override fun render(ctx: ProtocolGenerator.GenerationContext, writer: SwiftWriter, op: OperationShape, operationStackName: String) { renderEndpointParams(ctx, writer, op) - renderResolverBlock(writer) // Write code that saves endpoint params to middleware context for use in auth scheme middleware when using rules-based auth scheme resolvers if (AuthSchemeResolverGenerator.usesRulesBasedAuthResolver(ctx)) { - writer.write("context.set(key: \$N(name: \"EndpointParams\"), value: paramsBlock(context))", SmithyTypes.AttributeKey) + writer.write( + "context.set(key: \$N(name: \"EndpointParams\"), value: endpointParamsBlock(context))", + SmithyTypes.AttributeKey + ) } super.renderSpecific(ctx, writer, op, operationStackName, "applyEndpoint") @@ -66,16 +69,12 @@ class OperationEndpointResolverMiddleware( ) { val output = MiddlewareShapeUtils.outputSymbol(ctx.symbolProvider, ctx.model, op) writer.write( - "\$N<\$N, EndpointParams>(paramsBlock: paramsBlock, resolverBlock: resolverBlock)", + "\$N<\$N, EndpointParams>(paramsBlock: endpointParamsBlock, resolverBlock: { [config] in try config.endpointResolver.resolve(params: \$\$0) })", endpointResolverMiddlewareSymbol, output ) } - private fun renderResolverBlock(writer: SwiftWriter) { - writer.write("let resolverBlock = { [config] in try config.endpointResolver.resolve(params: \$\$0) }") - } - private fun renderEndpointParams(ctx: ProtocolGenerator.GenerationContext, writer: SwiftWriter, op: OperationShape) { val params = mutableListOf() ctx.service.getTrait()?.ruleSet?.let { node -> @@ -107,8 +106,13 @@ class OperationEndpointResolverMiddleware( } } - writer.openBlock("let paramsBlock = { [config] (context: \$N) in", "}", SmithyTypes.Context) { - writer.write("EndpointParams(${params.joinToString(separator = ", ")})") + writer.openBlock("let endpointParamsBlock = { [config] (context: \$N) in", "}", SmithyTypes.Context) { + writer.openBlock("EndpointParams(", ")") { + params.forEach { param -> + val commaOrNot = ",".takeIf { param !== params.last() } ?: "" + writer.write("\$L\$L", param, commaOrNot) + } + } } } @@ -173,6 +177,9 @@ class OperationEndpointResolverMiddleware( } clientContextParam != null -> { when { + param.name.toString() == "AccountId" -> { + writer.format("(context.selectedAuthScheme?.identity as? \$N)?.accountID", SmithyIdentityTypes.AWSCredentialIdentity) + } param.name.toString() == "AccountIdEndpointMode" -> { "config.accountIdEndpointMode?.rawValue" } diff --git a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/swiftmodules/AWSClientRuntimeTypes.kt b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/swiftmodules/AWSClientRuntimeTypes.kt index ca95478d050..8d297e2b3ae 100644 --- a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/swiftmodules/AWSClientRuntimeTypes.kt +++ b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/swiftmodules/AWSClientRuntimeTypes.kt @@ -33,6 +33,7 @@ object AWSClientRuntimeTypes { val AWSUserAgentMetadata = runtimeSymbol("AWSUserAgentMetadata", SwiftDeclaration.STRUCT) val UserAgentMiddleware = runtimeSymbol("UserAgentMiddleware", SwiftDeclaration.STRUCT) val AWSEndpointResolverMiddleware = runtimeSymbol("AWSEndpointResolverMiddleware", SwiftDeclaration.STRUCT, listOf("AWSEndpointResolverMiddleware")) + val AccountIDEndpointMode = runtimeSymbol("AccountIDEndpointMode", SwiftDeclaration.ENUM) val UnknownAWSHTTPServiceError = runtimeSymbol("UnknownAWSHTTPServiceError", SwiftDeclaration.STRUCT, listOf("UnknownAWSHTTPServiceError")) val AWSServiceError = runtimeSymbol("AWSServiceError", SwiftDeclaration.PROTOCOL) val Sha256TreeHashMiddleware = runtimeSymbol("Sha256TreeHashMiddleware", SwiftDeclaration.STRUCT) From f85862eb865e67ca5706ba48b256b944e03e8010 Mon Sep 17 00:00:00 2001 From: Josh Elkins Date: Mon, 9 Dec 2024 16:13:41 -0600 Subject: [PATCH 05/19] Add account ID endpoint mode resolution --- .../AWSClientConfigDefaultsProvider.swift | 15 +++++++ .../Endpoints/AWSEndpointConfig.swift | 26 +++++++++++++ .../Endpoints/AccountIDEndpointMode.swift | 2 +- .../Endpoints/AWSEndpointConfigTests.swift | 39 +++++++++++++++++++ .../Resources/aws_endpoint_config_tests | 5 +++ .../codegen/AWSHttpProtocolServiceClient.kt | 23 ++++++++--- .../OperationEndpointResolverMiddleware.kt | 10 +---- 7 files changed, 106 insertions(+), 14 deletions(-) create mode 100644 Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/AWSEndpointConfig.swift create mode 100644 Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/Endpoints/AWSEndpointConfigTests.swift create mode 100644 Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/Resources/aws_endpoint_config_tests diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/AWSClientConfigDefaultsProvider.swift b/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/AWSClientConfigDefaultsProvider.swift index a404faef401..5ff6099a3c3 100644 --- a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/AWSClientConfigDefaultsProvider.swift +++ b/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/AWSClientConfigDefaultsProvider.swift @@ -135,4 +135,19 @@ public class AWSClientConfigDefaultsProvider { rateLimitingMode: resolvedRateLimitingMode ) } + + public static func accountIDEndpointMode( + _ accountIDEndpointMode: AccountIDEndpointMode? + ) throws -> AccountIDEndpointMode { + let fileBasedConfig = try CRTFileBasedConfiguration.make() + if let accountIDEndpointMode { + return accountIDEndpointMode + } else { + return AWSEndpointConfig.accountIDEndpointMode( + configValue: accountIDEndpointMode, + profileName: nil, + fileBasedConfig: fileBasedConfig + ) + } + } } diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/AWSEndpointConfig.swift b/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/AWSEndpointConfig.swift new file mode 100644 index 00000000000..e14fac56d08 --- /dev/null +++ b/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/AWSEndpointConfig.swift @@ -0,0 +1,26 @@ +// +// Copyright Amazon.com Inc. or its affiliates. +// All Rights Reserved. +// +// SPDX-License-Identifier: Apache-2.0 +// + +@_spi(FileBasedConfig) import AWSSDKCommon + +public enum AWSEndpointConfig { + + static func accountIDEndpointMode( + configValue: AccountIDEndpointMode?, + profileName: String?, + fileBasedConfig: FileBasedConfiguration + ) -> AccountIDEndpointMode { + FieldResolver( + configValue: configValue, + envVarName: "AWS_ACCOUNT_ID_ENDPOINT_MODE", + configFieldName: "account_id_endpoint_mode", + fileBasedConfig: fileBasedConfig, + profileName: profileName, + converter: { AccountIDEndpointMode(rawValue: $0) } + ).value ?? .preferred + } +} diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/AccountIDEndpointMode.swift b/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/AccountIDEndpointMode.swift index ad31ec88ce3..8ac03ca6ebf 100644 --- a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/AccountIDEndpointMode.swift +++ b/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/AccountIDEndpointMode.swift @@ -6,7 +6,7 @@ // /// Determines how & whether an account ID-based endpoint will be used for requests. -public enum AccountIDEndpointMode: String { +public enum AccountIDEndpointMode: String, Equatable { // Note : these case names match string values for the accountIdEndpointMode endpoint param. // Do not rename them diff --git a/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/Endpoints/AWSEndpointConfigTests.swift b/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/Endpoints/AWSEndpointConfigTests.swift new file mode 100644 index 00000000000..f74aa23aa59 --- /dev/null +++ b/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/Endpoints/AWSEndpointConfigTests.swift @@ -0,0 +1,39 @@ +// +// Copyright Amazon.com Inc. or its affiliates. +// All Rights Reserved. +// +// SPDX-License-Identifier: Apache-2.0 +// + +import XCTest +@testable @_spi(FileBasedConfig) import AWSClientRuntime +@_spi(FileBasedConfig) @testable import AWSSDKCommon + +class AWSEndpointConfigTests: XCTestCase { + var fileBasedConfig: FileBasedConfiguration = try! CRTFileBasedConfiguration( + configFilePath: Bundle.module.path(forResource: "aws_endpoint_config_tests", ofType: nil)!, + credentialsFilePath: nil + ) + + // MARK: - accountIdEndpointMode + + func test_accountIdEndpointMode_resolvesAConfigValue() throws { + let subject = AWSEndpointConfig.accountIDEndpointMode(configValue: .required, profileName: nil, fileBasedConfig: fileBasedConfig) + XCTAssertEqual(subject, .required) + } + + func test_accountIdEndpointMode_resolvesDefaultProfile() throws { + let subject = AWSEndpointConfig.accountIDEndpointMode(configValue: nil, profileName: nil, fileBasedConfig: fileBasedConfig) + XCTAssertEqual(subject, .disabled) + } + + func test_accountIdEndpointMode_resolvesSpecifiedProfile() throws { + let subject = AWSEndpointConfig.accountIDEndpointMode(configValue: nil, profileName: "aws-endpoint-config-test", fileBasedConfig: fileBasedConfig) + XCTAssertEqual(subject, .required) + } + + func test_accountIdEndpointMode_defaultsToPreferred() throws { + let subject = AWSEndpointConfig.accountIDEndpointMode(configValue: nil, profileName: "no-such-profile", fileBasedConfig: fileBasedConfig) + XCTAssertEqual(subject, .preferred) + } +} diff --git a/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/Resources/aws_endpoint_config_tests b/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/Resources/aws_endpoint_config_tests new file mode 100644 index 00000000000..5976feaa299 --- /dev/null +++ b/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/Resources/aws_endpoint_config_tests @@ -0,0 +1,5 @@ +[default] +account_id_endpoint_mode = disabled + +[profile aws-endpoint-config-test] +account_id_endpoint_mode = required diff --git a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHttpProtocolServiceClient.kt b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHttpProtocolServiceClient.kt index e545c857b97..77df2586bc4 100644 --- a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHttpProtocolServiceClient.kt +++ b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHttpProtocolServiceClient.kt @@ -143,22 +143,35 @@ class AWSHttpProtocolServiceClient( override fun renderPartitionID() { writer.openBlock("public var partitionID: String? {", "}") { - writer.write("return \"\\(\$L.clientName) - \\(region ?? \"\")\"", serviceConfig.clientName.toUpperCamelCase()) + writer.write( + "return \"\\(\$L.clientName) - \\(region ?? \"\")\"", + serviceConfig.clientName.toUpperCamelCase(), + ) } writer.write("") } private val authSchemeResolverDefaultProvider = DefaultProvider( - { "Default${AuthSchemeResolverGenerator.getSdkId(ctx)}AuthSchemeResolver()" }, + { writer.format("Default\$LAuthSchemeResolver()", AuthSchemeResolverGenerator.getSdkId(ctx)) }, false, false ) override fun customizedClientConfigProperty(property: ConfigProperty): ConfigProperty? { return when (property.name) { - "accountId" -> null - "accountIdEndpointMode" -> { - ConfigProperty("accountIdEndpointMode", AWSClientRuntimeTypes.Core.AccountIDEndpointMode.toOptional()) + "accountId" -> null // do not expose accountId as a client config property + "accountIdEndpointMode" -> { // expose accountIdEndpointMode as a Swift string-backed enum + ConfigProperty( + "accountIdEndpointMode", + AWSClientRuntimeTypes.Core.AccountIDEndpointMode.toOptional(), + { writer -> + writer.format( + "\$N.accountIDEndpointMode(accountIdEndpointMode)", + AWSClientRuntimeTypes.Core.AWSClientConfigDefaultsProvider, + ) + }, + true + ) } else -> property } diff --git a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/middleware/OperationEndpointResolverMiddleware.kt b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/middleware/OperationEndpointResolverMiddleware.kt index de3592743b1..c6b54b3185e 100644 --- a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/middleware/OperationEndpointResolverMiddleware.kt +++ b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/middleware/OperationEndpointResolverMiddleware.kt @@ -31,7 +31,6 @@ import software.amazon.smithy.swift.codegen.integration.ProtocolGenerator import software.amazon.smithy.swift.codegen.integration.middlewares.handlers.MiddlewareShapeUtils import software.amazon.smithy.swift.codegen.middleware.MiddlewareRenderable import software.amazon.smithy.swift.codegen.model.getTrait -import software.amazon.smithy.swift.codegen.swiftmodules.SmithyIdentityTypes import software.amazon.smithy.swift.codegen.swiftmodules.SmithyTypes import software.amazon.smithy.swift.codegen.utils.toLowerCamelCase import software.amazon.smithy.swift.codegen.waiters.JMESPathVisitor @@ -107,12 +106,7 @@ class OperationEndpointResolverMiddleware( } writer.openBlock("let endpointParamsBlock = { [config] (context: \$N) in", "}", SmithyTypes.Context) { - writer.openBlock("EndpointParams(", ")") { - params.forEach { param -> - val commaOrNot = ",".takeIf { param !== params.last() } ?: "" - writer.write("\$L\$L", param, commaOrNot) - } - } + writer.write("EndpointParams(\$L)", params.joinToString(", ")) } } @@ -178,7 +172,7 @@ class OperationEndpointResolverMiddleware( clientContextParam != null -> { when { param.name.toString() == "AccountId" -> { - writer.format("(context.selectedAuthScheme?.identity as? \$N)?.accountID", SmithyIdentityTypes.AWSCredentialIdentity) + writer.format("context.resolvedAWSAccountID") } param.name.toString() == "AccountIdEndpointMode" -> { "config.accountIdEndpointMode?.rawValue" From 93e0634399ec23c4487522e0c821b982ebdbd3d7 Mon Sep 17 00:00:00 2001 From: Josh Elkins Date: Mon, 9 Dec 2024 16:33:58 -0600 Subject: [PATCH 06/19] fix tests --- ...perationEndpointResolverMiddlewareTests.kt | 5 ++--- .../swift/codegen/PresignerGeneratorTests.kt | 22 ++++++++----------- .../awsquery/AWSQueryOperationStackTest.kt | 5 ++--- 3 files changed, 13 insertions(+), 19 deletions(-) diff --git a/codegen/smithy-aws-swift-codegen/src/test/kotlin/software/amazon/smithy/aws/swift/codegen/OperationEndpointResolverMiddlewareTests.kt b/codegen/smithy-aws-swift-codegen/src/test/kotlin/software/amazon/smithy/aws/swift/codegen/OperationEndpointResolverMiddlewareTests.kt index bbf2265b6f7..a790f871823 100644 --- a/codegen/smithy-aws-swift-codegen/src/test/kotlin/software/amazon/smithy/aws/swift/codegen/OperationEndpointResolverMiddlewareTests.kt +++ b/codegen/smithy-aws-swift-codegen/src/test/kotlin/software/amazon/smithy/aws/swift/codegen/OperationEndpointResolverMiddlewareTests.kt @@ -50,11 +50,10 @@ let projection2: [Swift.String]? = objects2?.compactMap { original in let id = original.id return id } -let paramsBlock = { [config] (context: Smithy.Context) in +let endpointParamsBlock = { [config] (context: Smithy.Context) in EndpointParams(boolBar: true, boolBaz: input.fuzz, boolFoo: config.boolFoo, endpoint: config.endpoint, flattenedArray: projection, keysFunctionArray: keys, region: region, stringArrayBar: ["five", "six", "seven"], stringBar: "some value", stringBaz: input.buzz, stringFoo: config.stringFoo, subfield: subfield2, wildcardProjectionArray: projection2) } -let resolverBlock = { [config] in try config.endpointResolver.resolve(params: ${'$'}0) } -builder.applyEndpoint(AWSClientRuntime.AWSEndpointResolverMiddleware(paramsBlock: paramsBlock, resolverBlock: resolverBlock)) +builder.applyEndpoint(AWSClientRuntime.AWSEndpointResolverMiddleware(paramsBlock: endpointParamsBlock, resolverBlock: { [config] in try config.endpointResolver.resolve(params: ${'$'}0) })) """ contents.shouldContainOnlyOnce(expected) } diff --git a/codegen/smithy-aws-swift-codegen/src/test/kotlin/software/amazon/smithy/aws/swift/codegen/PresignerGeneratorTests.kt b/codegen/smithy-aws-swift-codegen/src/test/kotlin/software/amazon/smithy/aws/swift/codegen/PresignerGeneratorTests.kt index ff21fe1123b..dcb26e8b46f 100644 --- a/codegen/smithy-aws-swift-codegen/src/test/kotlin/software/amazon/smithy/aws/swift/codegen/PresignerGeneratorTests.kt +++ b/codegen/smithy-aws-swift-codegen/src/test/kotlin/software/amazon/smithy/aws/swift/codegen/PresignerGeneratorTests.kt @@ -53,11 +53,10 @@ extension GetFooInput { builder.retryStrategy(SmithyRetries.DefaultRetryStrategy(options: config.retryStrategyOptions)) builder.retryErrorInfoProvider(AWSClientRuntime.AWSRetryErrorInfoProvider.errorInfo(for:)) builder.applySigner(ClientRuntime.SignerMiddleware()) - let paramsBlock = { [config] (context: Smithy.Context) in + let endpointParamsBlock = { [config] (context: Smithy.Context) in EndpointParams() } - let resolverBlock = { [config] in try config.endpointResolver.resolve(params: ${'$'}0) } - builder.applyEndpoint(AWSClientRuntime.AWSEndpointResolverMiddleware(paramsBlock: paramsBlock, resolverBlock: resolverBlock)) + builder.applyEndpoint(AWSClientRuntime.AWSEndpointResolverMiddleware(paramsBlock: endpointParamsBlock, resolverBlock: { [config] in try config.endpointResolver.resolve(params: ${'$'}0) })) builder.interceptors.add(AWSClientRuntime.UserAgentMiddleware(serviceID: serviceName, version: ExampleClient.version, config: config)) builder.selectAuthScheme(ClientRuntime.AuthSchemeMiddleware()) var metricsAttributes = Smithy.Attributes() @@ -128,11 +127,10 @@ extension PostFooInput { builder.retryStrategy(SmithyRetries.DefaultRetryStrategy(options: config.retryStrategyOptions)) builder.retryErrorInfoProvider(AWSClientRuntime.AWSRetryErrorInfoProvider.errorInfo(for:)) builder.applySigner(ClientRuntime.SignerMiddleware()) - let paramsBlock = { [config] (context: Smithy.Context) in + let endpointParamsBlock = { [config] (context: Smithy.Context) in EndpointParams() } - let resolverBlock = { [config] in try config.endpointResolver.resolve(params: ${'$'}0) } - builder.applyEndpoint(AWSClientRuntime.AWSEndpointResolverMiddleware(paramsBlock: paramsBlock, resolverBlock: resolverBlock)) + builder.applyEndpoint(AWSClientRuntime.AWSEndpointResolverMiddleware(paramsBlock: endpointParamsBlock, resolverBlock: { [config] in try config.endpointResolver.resolve(params: ${'$'}0) })) builder.interceptors.add(AWSClientRuntime.UserAgentMiddleware(serviceID: serviceName, version: ExampleClient.version, config: config)) builder.selectAuthScheme(ClientRuntime.AuthSchemeMiddleware()) var metricsAttributes = Smithy.Attributes() @@ -203,11 +201,10 @@ extension PutFooInput { builder.retryStrategy(SmithyRetries.DefaultRetryStrategy(options: config.retryStrategyOptions)) builder.retryErrorInfoProvider(AWSClientRuntime.AWSRetryErrorInfoProvider.errorInfo(for:)) builder.applySigner(ClientRuntime.SignerMiddleware()) - let paramsBlock = { [config] (context: Smithy.Context) in + let endpointParamsBlock = { [config] (context: Smithy.Context) in EndpointParams() } - let resolverBlock = { [config] in try config.endpointResolver.resolve(params: ${'$'}0) } - builder.applyEndpoint(AWSClientRuntime.AWSEndpointResolverMiddleware(paramsBlock: paramsBlock, resolverBlock: resolverBlock)) + builder.applyEndpoint(AWSClientRuntime.AWSEndpointResolverMiddleware(paramsBlock: endpointParamsBlock, resolverBlock: { [config] in try config.endpointResolver.resolve(params: ${'$'}0) })) builder.interceptors.add(AWSClientRuntime.UserAgentMiddleware(serviceID: serviceName, version: ExampleClient.version, config: config)) builder.selectAuthScheme(ClientRuntime.AuthSchemeMiddleware()) var metricsAttributes = Smithy.Attributes() @@ -278,12 +275,11 @@ extension PutObjectInput { builder.retryStrategy(SmithyRetries.DefaultRetryStrategy(options: config.retryStrategyOptions)) builder.retryErrorInfoProvider(AWSClientRuntime.AWSRetryErrorInfoProvider.errorInfo(for:)) builder.applySigner(ClientRuntime.SignerMiddleware()) - let paramsBlock = { [config] (context: Smithy.Context) in + let endpointParamsBlock = { [config] (context: Smithy.Context) in EndpointParams() } - let resolverBlock = { [config] in try config.endpointResolver.resolve(params: ${'$'}0) } - context.set(key: Smithy.AttributeKey(name: "EndpointParams"), value: paramsBlock(context)) - builder.applyEndpoint(AWSClientRuntime.AWSEndpointResolverMiddleware(paramsBlock: paramsBlock, resolverBlock: resolverBlock)) + context.set(key: Smithy.AttributeKey(name: "EndpointParams"), value: endpointParamsBlock(context)) + builder.applyEndpoint(AWSClientRuntime.AWSEndpointResolverMiddleware(paramsBlock: endpointParamsBlock, resolverBlock: { [config] in try config.endpointResolver.resolve(params: ${'$'}0) })) builder.interceptors.add(AWSClientRuntime.UserAgentMiddleware(serviceID: serviceName, version: S3Client.version, config: config)) builder.selectAuthScheme(ClientRuntime.AuthSchemeMiddleware()) var metricsAttributes = Smithy.Attributes() diff --git a/codegen/smithy-aws-swift-codegen/src/test/kotlin/software/amazon/smithy/aws/swift/codegen/awsquery/AWSQueryOperationStackTest.kt b/codegen/smithy-aws-swift-codegen/src/test/kotlin/software/amazon/smithy/aws/swift/codegen/awsquery/AWSQueryOperationStackTest.kt index a4a6407f441..10b30297b83 100644 --- a/codegen/smithy-aws-swift-codegen/src/test/kotlin/software/amazon/smithy/aws/swift/codegen/awsquery/AWSQueryOperationStackTest.kt +++ b/codegen/smithy-aws-swift-codegen/src/test/kotlin/software/amazon/smithy/aws/swift/codegen/awsquery/AWSQueryOperationStackTest.kt @@ -36,11 +36,10 @@ class AWSQueryOperationStackTest { builder.retryStrategy(SmithyRetries.DefaultRetryStrategy(options: config.retryStrategyOptions)) builder.retryErrorInfoProvider(AWSClientRuntime.AWSRetryErrorInfoProvider.errorInfo(for:)) builder.applySigner(ClientRuntime.SignerMiddleware()) - let paramsBlock = { [config] (context: Smithy.Context) in + let endpointParamsBlock = { [config] (context: Smithy.Context) in EndpointParams() } - let resolverBlock = { [config] in try config.endpointResolver.resolve(params: ${'$'}0) } - builder.applyEndpoint(AWSClientRuntime.AWSEndpointResolverMiddleware(paramsBlock: paramsBlock, resolverBlock: resolverBlock)) + builder.applyEndpoint(AWSClientRuntime.AWSEndpointResolverMiddleware(paramsBlock: endpointParamsBlock, resolverBlock: { [config] in try config.endpointResolver.resolve(params: ${'$'}0) })) builder.interceptors.add(AWSClientRuntime.UserAgentMiddleware(serviceID: serviceName, version: QueryProtocolClient.version, config: config)) builder.serialize(ClientRuntime.BodyMiddleware(rootNodeInfo: "", inputWritingClosure: NoInputAndOutputInput.write(value:to:))) builder.interceptors.add(ClientRuntime.ContentTypeMiddleware(contentType: "application/x-www-form-urlencoded")) From c8aec20b19268b5b3d36cf7e5a16d60a98ae60cf Mon Sep 17 00:00:00 2001 From: Josh Elkins Date: Thu, 12 Dec 2024 15:10:10 -0600 Subject: [PATCH 07/19] Integrate CRT support for account ID, add tests --- IntegrationTests/Package.swift | 1 + .../Resources/.gitkeep | 0 .../AccountIDEndpointModeTests.swift | 148 ++++++++++++++++++ .../Resources/.gitkeep | 0 .../AWSIntegrationTestsOnCI.xctestplan | 55 ++++--- Package.swift | 2 +- .../AWSClientConfigDefaultsProvider.swift | 2 +- .../codegen/AWSHttpProtocolServiceClient.kt | 2 +- packageDependencies.plist | 2 +- 9 files changed, 184 insertions(+), 28 deletions(-) create mode 100644 IntegrationTests/Services/AWSCognitoIdentityIntegrationTests/Resources/.gitkeep create mode 100644 IntegrationTests/Services/AWSDynamoDBIntegrationTests/AccountIDEndpointModeTests.swift create mode 100644 IntegrationTests/Services/AWSDynamoDBIntegrationTests/Resources/.gitkeep diff --git a/IntegrationTests/Package.swift b/IntegrationTests/Package.swift index 772fd161304..9d3ec666edf 100644 --- a/IntegrationTests/Package.swift +++ b/IntegrationTests/Package.swift @@ -146,6 +146,7 @@ func addIntegrationTestTarget(_ name: String) { let servicesWithIntegrationTests: [String] = [ "AWSCloudFrontKeyValueStore", + "AWSDynamoDB", "AWSEC2", "AWSECS", "AWSEventBridge", diff --git a/IntegrationTests/Services/AWSCognitoIdentityIntegrationTests/Resources/.gitkeep b/IntegrationTests/Services/AWSCognitoIdentityIntegrationTests/Resources/.gitkeep new file mode 100644 index 00000000000..e69de29bb2d diff --git a/IntegrationTests/Services/AWSDynamoDBIntegrationTests/AccountIDEndpointModeTests.swift b/IntegrationTests/Services/AWSDynamoDBIntegrationTests/AccountIDEndpointModeTests.swift new file mode 100644 index 00000000000..a5706d5d3d7 --- /dev/null +++ b/IntegrationTests/Services/AWSDynamoDBIntegrationTests/AccountIDEndpointModeTests.swift @@ -0,0 +1,148 @@ +// +// Copyright Amazon.com Inc. or its affiliates. +// All Rights Reserved. +// +// SPDX-License-Identifier: Apache-2.0 +// + +import XCTest +import AWSDynamoDB +import SmithyTestUtil +import SmithyIdentity +import enum AWSClientRuntime.AccountIDEndpointMode +import enum ClientRuntime.EndpointError + +final class AccountIDEndpointModeTests: XCTestCase { + private let accountID = "0123456789" + + // MARK: - Tests + + // MARK: nil + + func test_nilMode_prefersByDefault() async throws { + let subject = try await subject(accountIDEndpointMode: nil, setAccountID: true) + + do { + _ = try await subject.getItem(input: GetItemInput()) + XCTFail("Request should have thrown") + } catch TestCheckError.actual(let request) { + XCTAssert(request.endpoint.host.contains(accountID)) + } catch { + XCTFail("Request should have succeeded, threw error: \(error)") + } + } + + func test_nilMode_createsEndpointWithoutAccountID() async throws { + let subject = try await subject(accountIDEndpointMode: nil, setAccountID: false) + + do { + _ = try await subject.getItem(input: GetItemInput()) + XCTFail("Request should have thrown") + } catch TestCheckError.actual(let request) { + XCTAssertFalse(request.endpoint.host.contains(accountID)) + } catch { + XCTFail("Request failed on unexpected error") + } + } + + // MARK: preferred + + func test_preferredMode_prefersByDefault() async throws { + let subject = try await subject(accountIDEndpointMode: .preferred, setAccountID: true) + + do { + _ = try await subject.getItem(input: GetItemInput()) + XCTFail("Request should have thrown") + } catch TestCheckError.actual(let request) { + XCTAssert(request.endpoint.host.contains(accountID)) + } catch { + XCTFail("Request should have succeeded, threw error: \(error)") + } + } + + func test_preferredMode_createsEndpointWithoutAccountID() async throws { + let subject = try await subject(accountIDEndpointMode: .preferred, setAccountID: false) + + do { + _ = try await subject.getItem(input: GetItemInput()) + XCTFail("Request should have thrown") + } catch TestCheckError.actual(let request) { + XCTAssertFalse(request.endpoint.host.contains(accountID)) + } catch { + XCTFail("Request failed on unexpected error") + } + } + + // MARK: required + + func test_requiredMode_createsEndpointWithAccountID() async throws { + let subject = try await subject(accountIDEndpointMode: .required, setAccountID: true) + + do { + _ = try await subject.getItem(input: GetItemInput()) + XCTFail("Request should have thrown") + } catch TestCheckError.actual(let request) { + XCTAssert(request.endpoint.host.contains(accountID)) + } catch { + XCTFail("Request should have succeeded, threw error: \(error)") + } + } + + func test_requiredMode_failsWhenRequiredButNotPresent() async throws { + let subject = try await subject(accountIDEndpointMode: .required, setAccountID: false) + + do { + _ = try await subject.getItem(input: GetItemInput()) + XCTFail("Request should have thrown") + } catch EndpointError.unresolved { + // No action, test succeeded + } catch { + XCTFail("Request failed on unexpected error") + } + } + + // MARK: disabled + + func test_disabledMode_createsEndpointWithoutAccountIDWhenNil() async throws { + let subject = try await subject(accountIDEndpointMode: .disabled, setAccountID: false) + + do { + _ = try await subject.getItem(input: GetItemInput()) + XCTFail("Request should have thrown") + } catch TestCheckError.actual(let request) { + XCTAssertFalse(request.endpoint.host.contains(accountID)) + } catch { + XCTFail("Request failed on unexpected error") + } + } + + func test_disabledMode_createsEndpointWithoutAccountIDWhenSupplied() async throws { + let subject = try await subject(accountIDEndpointMode: .disabled, setAccountID: true) + + do { + _ = try await subject.getItem(input: GetItemInput()) + XCTFail("Request should have thrown") + } catch TestCheckError.actual(let request) { + XCTAssertFalse(request.endpoint.host.contains(accountID)) + } catch { + XCTFail("Request failed on unexpected error") + } + } + + // MARK: - Private methods + + private func subject( + accountIDEndpointMode: AccountIDEndpointMode?, + setAccountID: Bool + ) async throws -> DynamoDBClient { + let accountID = setAccountID ? self.accountID : nil + let credentials = AWSCredentialIdentity(accessKey: "abc", secret: "def", accountID: accountID) + let resolver = try StaticAWSCredentialIdentityResolver(credentials) + let config = try await DynamoDBClient.Config( + awsCredentialIdentityResolver: resolver, + accountIdEndpointMode: accountIDEndpointMode, + httpClientEngine: ProtocolTestClient() + ) + return DynamoDBClient(config: config) + } +} diff --git a/IntegrationTests/Services/AWSDynamoDBIntegrationTests/Resources/.gitkeep b/IntegrationTests/Services/AWSDynamoDBIntegrationTests/Resources/.gitkeep new file mode 100644 index 00000000000..e69de29bb2d diff --git a/IntegrationTests/XCTestPlans/AWSIntegrationTestsOnCI.xctestplan b/IntegrationTests/XCTestPlans/AWSIntegrationTestsOnCI.xctestplan index eb8e344e930..24326dba6d3 100644 --- a/IntegrationTests/XCTestPlans/AWSIntegrationTestsOnCI.xctestplan +++ b/IntegrationTests/XCTestPlans/AWSIntegrationTestsOnCI.xctestplan @@ -17,43 +17,43 @@ { "target" : { "containerPath" : "container:", - "identifier" : "AWSCognitoIdentityIntegrationTests", - "name" : "AWSCognitoIdentityIntegrationTests" + "identifier" : "AWSSQSIntegrationTests", + "name" : "AWSSQSIntegrationTests" } }, { "target" : { "containerPath" : "container:", - "identifier" : "AWSSTSIntegrationTests", - "name" : "AWSSTSIntegrationTests" + "identifier" : "AWSKinesisIntegrationTests", + "name" : "AWSKinesisIntegrationTests" } }, { "target" : { "containerPath" : "container:", - "identifier" : "AWSTranscribeStreamingIntegrationTests", - "name" : "AWSTranscribeStreamingIntegrationTests" + "identifier" : "AWSEC2IntegrationTests", + "name" : "AWSEC2IntegrationTests" } }, { "target" : { "containerPath" : "container:", - "identifier" : "AWSECSIntegrationTests", - "name" : "AWSECSIntegrationTests" + "identifier" : "AWSSTSIntegrationTests", + "name" : "AWSSTSIntegrationTests" } }, { "target" : { "containerPath" : "container:", - "identifier" : "AWSGlacierIntegrationTests", - "name" : "AWSGlacierIntegrationTests" + "identifier" : "AWSDynamoDBIntegrationTests", + "name" : "AWSDynamoDBIntegrationTests" } }, { "target" : { "containerPath" : "container:", - "identifier" : "AWSMediaConvertIntegrationTests", - "name" : "AWSMediaConvertIntegrationTests" + "identifier" : "AWSECSIntegrationTests", + "name" : "AWSECSIntegrationTests" } }, { @@ -66,43 +66,50 @@ { "target" : { "containerPath" : "container:", - "identifier" : "AWSSQSIntegrationTests", - "name" : "AWSSQSIntegrationTests" + "identifier" : "AWSS3IntegrationTests", + "name" : "AWSS3IntegrationTests" } }, { "target" : { "containerPath" : "container:", - "identifier" : "AWSEventBridgeIntegrationTests", - "name" : "AWSEventBridgeIntegrationTests" + "identifier" : "AWSCognitoIdentityIntegrationTests", + "name" : "AWSCognitoIdentityIntegrationTests" } }, { "target" : { "containerPath" : "container:", - "identifier" : "AWSEC2IntegrationTests", - "name" : "AWSEC2IntegrationTests" + "identifier" : "AWSTranscribeStreamingIntegrationTests", + "name" : "AWSTranscribeStreamingIntegrationTests" } }, { "target" : { "containerPath" : "container:", - "identifier" : "AWSKinesisIntegrationTests", - "name" : "AWSKinesisIntegrationTests" + "identifier" : "AWSRoute53IntegrationTests", + "name" : "AWSRoute53IntegrationTests" } }, { "target" : { "containerPath" : "container:", - "identifier" : "AWSRoute53IntegrationTests", - "name" : "AWSRoute53IntegrationTests" + "identifier" : "AWSGlacierIntegrationTests", + "name" : "AWSGlacierIntegrationTests" } }, { "target" : { "containerPath" : "container:", - "identifier" : "AWSS3IntegrationTests", - "name" : "AWSS3IntegrationTests" + "identifier" : "AWSMediaConvertIntegrationTests", + "name" : "AWSMediaConvertIntegrationTests" + } + }, + { + "target" : { + "containerPath" : "container:", + "identifier" : "AWSEventBridgeIntegrationTests", + "name" : "AWSEventBridgeIntegrationTests" } } ], diff --git a/Package.swift b/Package.swift index fab0b3b4de8..07a053e9197 100644 --- a/Package.swift +++ b/Package.swift @@ -16,7 +16,7 @@ import PackageDescription // MARK: - Dynamic Content let clientRuntimeVersion: Version = "0.100.0" -let crtVersion: Version = "0.40.0" +let crtVersion: Version = "0.41.0" let excludeRuntimeUnitTests = false diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/AWSClientConfigDefaultsProvider.swift b/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/AWSClientConfigDefaultsProvider.swift index 5ff6099a3c3..3d7a2678a9f 100644 --- a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/AWSClientConfigDefaultsProvider.swift +++ b/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/AWSClientConfigDefaultsProvider.swift @@ -137,7 +137,7 @@ public class AWSClientConfigDefaultsProvider { } public static func accountIDEndpointMode( - _ accountIDEndpointMode: AccountIDEndpointMode? + _ accountIDEndpointMode: AccountIDEndpointMode? = nil ) throws -> AccountIDEndpointMode { let fileBasedConfig = try CRTFileBasedConfiguration.make() if let accountIDEndpointMode { diff --git a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHttpProtocolServiceClient.kt b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHttpProtocolServiceClient.kt index 77df2586bc4..3ab2b4d01b0 100644 --- a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHttpProtocolServiceClient.kt +++ b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHttpProtocolServiceClient.kt @@ -166,7 +166,7 @@ class AWSHttpProtocolServiceClient( AWSClientRuntimeTypes.Core.AccountIDEndpointMode.toOptional(), { writer -> writer.format( - "\$N.accountIDEndpointMode(accountIdEndpointMode)", + "\$N.accountIDEndpointMode()", AWSClientRuntimeTypes.Core.AWSClientConfigDefaultsProvider, ) }, diff --git a/packageDependencies.plist b/packageDependencies.plist index 978a0d62458..5eac451e1bd 100644 --- a/packageDependencies.plist +++ b/packageDependencies.plist @@ -5,7 +5,7 @@ awsCRTSwiftBranch main awsCRTSwiftVersion - 0.40.0 + 0.41.0 clientRuntimeBranch main clientRuntimeVersion From b63249266baf613aaa21714768b12611f6eb1fd3 Mon Sep 17 00:00:00 2001 From: Josh Elkins Date: Thu, 12 Dec 2024 15:51:07 -0600 Subject: [PATCH 08/19] Generate dynamodb for integration tests --- scripts/integration-test-sdk.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/integration-test-sdk.properties b/scripts/integration-test-sdk.properties index 166be55dff9..b7b124dcc5e 100644 --- a/scripts/integration-test-sdk.properties +++ b/scripts/integration-test-sdk.properties @@ -1,2 +1,2 @@ # Only include services needed for running integration tests -onlyIncludeModels=kinesis,s3,sso-admin,transcribe-streaming,sqs,mediaconvert,sts,cognito-identity,iam,ec2,ecs,cloudwatch-logs,s3-control,eventbridge,cloudfront,cloudfront-keyvaluestore,route-53,glacier +onlyIncludeModels=kinesis,s3,sso-admin,transcribe-streaming,sqs,mediaconvert,sts,cognito-identity,iam,ec2,ecs,cloudwatch-logs,s3-control,eventbridge,cloudfront,cloudfront-keyvaluestore,route-53,glacier,dynamodb From c1543cd5c03c1bf513d9527d08b34666dfbf30a2 Mon Sep 17 00:00:00 2001 From: Josh Elkins Date: Thu, 12 Dec 2024 16:45:53 -0600 Subject: [PATCH 09/19] Set region in endpoint mode test --- .../AWSDynamoDBIntegrationTests/AccountIDEndpointModeTests.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/IntegrationTests/Services/AWSDynamoDBIntegrationTests/AccountIDEndpointModeTests.swift b/IntegrationTests/Services/AWSDynamoDBIntegrationTests/AccountIDEndpointModeTests.swift index a5706d5d3d7..68d9571de8b 100644 --- a/IntegrationTests/Services/AWSDynamoDBIntegrationTests/AccountIDEndpointModeTests.swift +++ b/IntegrationTests/Services/AWSDynamoDBIntegrationTests/AccountIDEndpointModeTests.swift @@ -140,6 +140,7 @@ final class AccountIDEndpointModeTests: XCTestCase { let resolver = try StaticAWSCredentialIdentityResolver(credentials) let config = try await DynamoDBClient.Config( awsCredentialIdentityResolver: resolver, + region: "us-east-1", accountIdEndpointMode: accountIDEndpointMode, httpClientEngine: ProtocolTestClient() ) From 8c5c3e5bc6581d504f9b7d5e54c6a29fdca6be87 Mon Sep 17 00:00:00 2001 From: Josh Elkins Date: Fri, 13 Dec 2024 16:04:05 -0600 Subject: [PATCH 10/19] Add business metrics --- .../Context+AccountIDEndpointMode.swift | 30 ++++++ .../Endpoints/Context+ResolvedEndpoint.swift | 21 ++++ .../EndpointResolverMiddleware.swift | 3 + .../UserAgent/BusinessMetrics.swift | 24 +++++ .../UserAgent/BusinessMetricsTests.swift | 96 ++++++++++++++++--- .../codegen/AWSHTTPProtocolClientGenerator.kt | 39 ++++++++ .../AWSHttpProtocolClientGeneratorFactory.kt | 2 +- .../AWSMiddlewareExecutionGenerator.kt | 28 ++++++ .../aws/swift/codegen/PresignerGenerator.kt | 13 +-- .../presignable/PresignableUrlIntegration.kt | 5 +- 10 files changed, 233 insertions(+), 28 deletions(-) create mode 100644 Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/Context+AccountIDEndpointMode.swift create mode 100644 Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/Context+ResolvedEndpoint.swift create mode 100644 codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHTTPProtocolClientGenerator.kt create mode 100644 codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSMiddlewareExecutionGenerator.kt diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/Context+AccountIDEndpointMode.swift b/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/Context+AccountIDEndpointMode.swift new file mode 100644 index 00000000000..995b71ee25f --- /dev/null +++ b/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/Context+AccountIDEndpointMode.swift @@ -0,0 +1,30 @@ +// +// Copyright Amazon.com Inc. or its affiliates. +// All Rights Reserved. +// +// SPDX-License-Identifier: Apache-2.0 +// + +import struct Smithy.Attributes +import struct Smithy.AttributeKey +import class Smithy.Context +import class Smithy.ContextBuilder + +public extension Context { + + var accountIDEndpointMode: AccountIDEndpointMode? { + get { get(key: accountIDEndpointModeKey) } + set { set(key: accountIDEndpointModeKey, value: newValue) } + } +} + +public extension ContextBuilder { + + @discardableResult + func withAccountIDEndpointMode(value: AccountIDEndpointMode?) -> Self { + attributes.set(key: accountIDEndpointModeKey, value: value) + return self + } +} + +private let accountIDEndpointModeKey = AttributeKey(name: "AccountIDEndpointMode") diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/Context+ResolvedEndpoint.swift b/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/Context+ResolvedEndpoint.swift new file mode 100644 index 00000000000..36e5cdae35e --- /dev/null +++ b/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/Context+ResolvedEndpoint.swift @@ -0,0 +1,21 @@ +// +// Copyright Amazon.com Inc. or its affiliates. +// All Rights Reserved. +// +// SPDX-License-Identifier: Apache-2.0 +// + +import struct Smithy.Attributes +import struct Smithy.AttributeKey +import class Smithy.Context +import struct SmithyHTTPAPI.Endpoint + +public extension Context { + + var resolvedEndpoint: Endpoint? { + get { get(key: resolvedEndpointKey) } + set { set(key: resolvedEndpointKey, value: newValue) } + } +} + +private let resolvedEndpointKey = AttributeKey(name: "ResolvedEndpoint") diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/EndpointResolverMiddleware.swift b/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/EndpointResolverMiddleware.swift index 1576037cab0..f15c3631ae1 100644 --- a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/EndpointResolverMiddleware.swift +++ b/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/EndpointResolverMiddleware.swift @@ -47,6 +47,9 @@ extension AWSEndpointResolverMiddleware: ApplyEndpoint { let endpoint = try resolverBlock(paramsBlock(attributes)) + // Put endpoint into context for use in business metrics + attributes.resolvedEndpoint = endpoint + var signingName: String? var signingAlgorithm: String? var signingRegion: String? diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/BusinessMetrics.swift b/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/BusinessMetrics.swift index 58b19e63a92..95f41393123 100644 --- a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/BusinessMetrics.swift +++ b/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/BusinessMetrics.swift @@ -95,12 +95,36 @@ private func setFlagsIntoContext( case .adaptive: context.businessMetrics = ["RETRY_MODE_ADAPTIVE": "F"] } + // Handle N if let endpoint = config.endpoint, !endpoint.isEmpty { context.businessMetrics = ["ENDPOINT_OVERRIDE": "N"] } + + // Handle O + if let endpoint = context.resolvedEndpoint, let accountID = context.resolvedAWSAccountID, endpoint.host.contains(accountID) { + context.businessMetrics = ["ACCOUNT_ID_ENDPOINT": "O"] + } + + // Handle P, Q, R + if let accountIDEndpointMode = context.accountIDEndpointMode { + switch accountIDEndpointMode { + case .preferred: + context.businessMetrics = ["ACCOUNT_ID_MODE_PREFERRED": "P"] + case .disabled: + context.businessMetrics = ["ACCOUNT_ID_MODE_DISABLED": "Q"] + case .required: + context.businessMetrics = ["ACCOUNT_ID_MODE_REQUIRED": "R"] + } + } + // Handle S if context.selectedAuthScheme?.schemeID == "aws.auth#sigv4a" { context.businessMetrics = ["SIGV4A_SIGNING": "S"] } + + // Handle T + if context.resolvedAWSAccountID != nil { + context.businessMetrics = ["RESOLVED_ACCOUNT_ID": "T"] + } } diff --git a/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/BusinessMetricsTests.swift b/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/BusinessMetricsTests.swift index 672db12cadb..aa29a42a7aa 100644 --- a/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/BusinessMetricsTests.swift +++ b/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/BusinessMetricsTests.swift @@ -9,6 +9,7 @@ import XCTest import ClientRuntime @testable import AWSClientRuntime import SmithyRetriesAPI +import SmithyHTTPAPI import SmithyHTTPAuthAPI import SmithyIdentity import SmithyRetriesAPI @@ -16,21 +17,22 @@ import Smithy class BusinessMetricsTests: XCTestCase { var context: Context! + var config: UserAgentValuesFromConfig! override func setUp() async throws { + config = UserAgentValuesFromConfig(appID: nil, endpoint: nil, awsRetryMode: .standard) context = Context(attributes: Attributes()) } + // MARK: - Truncation + func test_business_metrics_section_truncation() { context.businessMetrics = ["SHORT_FILLER": "A"] let longMetricValue = String(repeating: "F", count: 1025) context.businessMetrics = ["LONG_FILLER": longMetricValue] - let userAgent = AWSUserAgentMetadata.fromConfigAndContext( - serviceID: "test", - version: "1.0", - config: UserAgentValuesFromConfig(appID: nil, endpoint: nil, awsRetryMode: .standard), - context: context - ) + + let userAgent = testUserAgent() + // Assert values in context match with values assigned to user agent XCTAssertEqual(userAgent.businessMetrics?.features, context.businessMetrics) // Assert string gets truncated successfully @@ -38,6 +40,8 @@ class BusinessMetricsTests: XCTestCase { XCTAssertEqual(userAgent.businessMetrics?.description, expectedTruncatedString) } + // MARK: - Multiple flags + func test_multiple_flags_in_context() { context.businessMetrics = ["FIRST": "A"] context.businessMetrics = ["SECOND": "B"] @@ -47,14 +51,84 @@ class BusinessMetricsTests: XCTestCase { signingProperties: nil, signer: nil )) - let userAgent = AWSUserAgentMetadata.fromConfigAndContext( + + config = UserAgentValuesFromConfig(appID: nil, endpoint: "test-endpoint", awsRetryMode: .adaptive) + let userAgent = testUserAgent() + + // F comes from retry mode being adaptive & N comes from endpoint override + let expectedString = "m/A,B,F,N,S" + XCTAssertEqual(userAgent.businessMetrics?.description, expectedString) + } + + // MARK: - Account ID in Endpoint + + func test_accountIDInEndpoint_noAccountIDInEndpoint() { + configureContext(host: "dynamodb.us-east-1.amazonaws.com", accountID: "0123456789") + + let userAgent = testUserAgent() + + // E comes from retry mode & T comes from resolving account ID + let expectedString = "m/E,T" + XCTAssertEqual(userAgent.businessMetrics?.description, expectedString) + } + + func test_accountIDInEndpoint_hasAccountIDInEndpoint() { + configureContext(host: "0123456789.dynamodb.us-east-1.amazonaws.com", accountID: "0123456789") + + let userAgent = testUserAgent() + + // E comes from retry mode, O comes from account ID in endpoint, & T comes from resolving account ID + let expectedString = "m/E,O,T" + XCTAssertEqual(userAgent.businessMetrics?.description, expectedString) + } + + // MARK: - AccountIDEndpointMode + + func test_accountIDEndpointMode_recordsPreferredCorrectly() { + context.accountIDEndpointMode = .preferred + + let userAgent = testUserAgent() + + // E comes from retry mode & P comes from preferred account ID endpoint mode + let expectedString = "m/E,P" + XCTAssertEqual(userAgent.businessMetrics?.description, expectedString) + } + + func test_accountIDEndpointMode_recordsDisabledCorrectly() { + context.accountIDEndpointMode = .disabled + + let userAgent = testUserAgent() + + // E comes from retry mode & Q comes from disabled account ID endpoint mode + let expectedString = "m/E,Q" + XCTAssertEqual(userAgent.businessMetrics?.description, expectedString) + } + + func test_accountIDEndpointMode_recordsRequiredCorrectly() { + context.accountIDEndpointMode = .required + + let userAgent = testUserAgent() + + // E comes from retry mode & R comes from required account ID endpoint mode + let expectedString = "m/E,R" + XCTAssertEqual(userAgent.businessMetrics?.description, expectedString) + } + + // MARK: - Private methods + + private func testUserAgent() -> AWSUserAgentMetadata { + AWSUserAgentMetadata.fromConfigAndContext( serviceID: "test", version: "1.0", - config: UserAgentValuesFromConfig(appID: nil, endpoint: "test-endpoint", awsRetryMode: .adaptive), + config: config, context: context ) - // F comes from retry mode being adaptive & N comes from endpoint override - let expectedString = "m/A,B,F,N,S" - XCTAssertEqual(userAgent.businessMetrics?.description, expectedString) + } + + private func configureContext(host: String, accountID: String) { + let selectedAuthScheme = SelectedAuthScheme(schemeID: "aws.auth#sigv4", identity: AWSCredentialIdentity(accessKey: "abc", secret: "def", accountID: accountID), signingProperties: Attributes(), signer: nil) + context.selectedAuthScheme = selectedAuthScheme + let uri = URIBuilder().withScheme(.https).withPath("/").withHost(host).build() + context.resolvedEndpoint = Endpoint(uri: uri) } } diff --git a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHTTPProtocolClientGenerator.kt b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHTTPProtocolClientGenerator.kt new file mode 100644 index 00000000000..10c54d081d6 --- /dev/null +++ b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHTTPProtocolClientGenerator.kt @@ -0,0 +1,39 @@ +package software.amazon.smithy.aws.swift.codegen + +import software.amazon.smithy.swift.codegen.SwiftWriter +import software.amazon.smithy.swift.codegen.integration.HTTPProtocolCustomizable +import software.amazon.smithy.swift.codegen.integration.HttpBindingResolver +import software.amazon.smithy.swift.codegen.integration.HttpProtocolClientGenerator +import software.amazon.smithy.swift.codegen.integration.ProtocolGenerator +import software.amazon.smithy.swift.codegen.integration.ServiceConfig +import software.amazon.smithy.swift.codegen.middleware.MiddlewareExecutionGenerator +import software.amazon.smithy.swift.codegen.middleware.OperationMiddleware + +class AWSHTTPProtocolClientGenerator( + private val ctx: ProtocolGenerator.GenerationContext, + private val writer: SwiftWriter, + serviceConfig: ServiceConfig, + private val httpBindingResolver: HttpBindingResolver, + private val defaultContentType: String, + private val httpProtocolCustomizable: HTTPProtocolCustomizable, + private val operationMiddleware: OperationMiddleware +): HttpProtocolClientGenerator(ctx, writer, serviceConfig, httpBindingResolver, defaultContentType, httpProtocolCustomizable, operationMiddleware) { + + override fun makeMiddlewareExecutionGenerator( + ctx: ProtocolGenerator.GenerationContext, + writer: SwiftWriter, + httpBindingResolver: HttpBindingResolver, + httpProtocolCustomizable: HTTPProtocolCustomizable, + operationMiddleware: OperationMiddleware, + operationStackName: String + ): MiddlewareExecutionGenerator { + return AWSMiddlewareExecutionGenerator( + ctx, + writer, + httpBindingResolver, + httpProtocolCustomizable, + operationMiddleware, + operationStackName + ) + } +} \ No newline at end of file diff --git a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHttpProtocolClientGeneratorFactory.kt b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHttpProtocolClientGeneratorFactory.kt index 1cf3aa03b3d..d33aff5fa91 100644 --- a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHttpProtocolClientGeneratorFactory.kt +++ b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHttpProtocolClientGeneratorFactory.kt @@ -24,6 +24,6 @@ class AWSHttpProtocolClientGeneratorFactory : HttpProtocolClientGeneratorFactory operationMiddleware: OperationMiddleware ): HttpProtocolClientGenerator { val config = AWSServiceConfig(writer, ctx) - return HttpProtocolClientGenerator(ctx, writer, config, httpBindingResolver, defaultContentType, httpProtocolCustomizable, operationMiddleware) + return AWSHTTPProtocolClientGenerator(ctx, writer, config, httpBindingResolver, defaultContentType, httpProtocolCustomizable, operationMiddleware) } } diff --git a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSMiddlewareExecutionGenerator.kt b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSMiddlewareExecutionGenerator.kt new file mode 100644 index 00000000000..db3b77cc62e --- /dev/null +++ b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSMiddlewareExecutionGenerator.kt @@ -0,0 +1,28 @@ +package software.amazon.smithy.aws.swift.codegen + +import software.amazon.smithy.swift.codegen.SwiftWriter +import software.amazon.smithy.swift.codegen.config.ConfigProperty +import software.amazon.smithy.swift.codegen.integration.HTTPProtocolCustomizable +import software.amazon.smithy.swift.codegen.integration.HttpBindingResolver +import software.amazon.smithy.swift.codegen.integration.ProtocolGenerator +import software.amazon.smithy.swift.codegen.middleware.MiddlewareExecutionGenerator +import software.amazon.smithy.swift.codegen.middleware.OperationMiddleware + +class AWSMiddlewareExecutionGenerator( + ctx: ProtocolGenerator.GenerationContext, + private val writer: SwiftWriter, + httpBindingResolver: HttpBindingResolver, + httpProtocolCustomizable: HTTPProtocolCustomizable, + operationMiddleware: OperationMiddleware, operationStackName: String +): MiddlewareExecutionGenerator( + ctx, writer, httpBindingResolver, httpProtocolCustomizable, operationMiddleware, operationStackName +) { + + override fun renderConfigPropertyToContext(configProperty: ConfigProperty) { + when (configProperty.name) { + "accountIdEndpointMode" -> { // Used for business metrics + writer.write(" .withAccountIDEndpointMode(value: config.accountIdEndpointMode)") + } + } + } +} \ No newline at end of file diff --git a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/PresignerGenerator.kt b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/PresignerGenerator.kt index 6dd2b8a165d..5c4e83651f4 100644 --- a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/PresignerGenerator.kt +++ b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/PresignerGenerator.kt @@ -56,14 +56,6 @@ class PresignerGenerator : SwiftIntegration { renderPresignAPIInServiceClient(writer, symbol.name, op, inputType) } } -// // Import FoundationNetworking statement with preprocessor commands -// if (presignOperations.isNotEmpty()) { -// val symbol = protoCtx.symbolProvider.toSymbol(protoCtx.service) -// protoCtx.delegator.useFileWriter("Sources/${ctx.settings.moduleName}/${symbol.name}.swift") { writer -> -// // In Linux, Foundation.URLRequest is moved to FoundationNetworking. -// writer.addImport(packageName = "FoundationNetworking", importOnlyIfCanImport = true) -// } -// } } private fun renderPresigner( @@ -108,10 +100,7 @@ class PresignerGenerator : SwiftIntegration { operationMiddleware, operationStackName ) - generator.render(serviceShape, op, PRESIGN_REQUEST) { writer, _ -> - writer.write("return nil") - } - + generator.render(serviceShape, op, PRESIGN_REQUEST) writer.write("return try await op.presignRequest(input: input)") } } diff --git a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/customization/presignable/PresignableUrlIntegration.kt b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/customization/presignable/PresignableUrlIntegration.kt index 1a0148fd33e..7962485f48b 100644 --- a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/customization/presignable/PresignableUrlIntegration.kt +++ b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/customization/presignable/PresignableUrlIntegration.kt @@ -137,10 +137,7 @@ class PresignableUrlIntegration(private val presignedOperations: Map - writer.write("return nil") - } - + generator.render(serviceShape, op, PRESIGN_URL) writer.write("return try await op.presignRequest(input: input).endpoint.url") } } From 82da91b23ca2d795623e658841d4eddb7cd70ef5 Mon Sep 17 00:00:00 2001 From: Josh Elkins Date: Tue, 17 Dec 2024 13:30:38 -0600 Subject: [PATCH 11/19] Several lint and config fixes --- .../codegen/AWSHTTPProtocolClientGenerator.kt | 4 ++-- .../swift/codegen/AWSHttpProtocolServiceClient.kt | 14 ++++++++------ .../codegen/AWSMiddlewareExecutionGenerator.kt | 7 ++++--- sdk.properties | 1 - 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHTTPProtocolClientGenerator.kt b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHTTPProtocolClientGenerator.kt index 10c54d081d6..ffe5ab7b1b5 100644 --- a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHTTPProtocolClientGenerator.kt +++ b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHTTPProtocolClientGenerator.kt @@ -17,7 +17,7 @@ class AWSHTTPProtocolClientGenerator( private val defaultContentType: String, private val httpProtocolCustomizable: HTTPProtocolCustomizable, private val operationMiddleware: OperationMiddleware -): HttpProtocolClientGenerator(ctx, writer, serviceConfig, httpBindingResolver, defaultContentType, httpProtocolCustomizable, operationMiddleware) { +) : HttpProtocolClientGenerator(ctx, writer, serviceConfig, httpBindingResolver, defaultContentType, httpProtocolCustomizable, operationMiddleware) { override fun makeMiddlewareExecutionGenerator( ctx: ProtocolGenerator.GenerationContext, @@ -36,4 +36,4 @@ class AWSHTTPProtocolClientGenerator( operationStackName ) } -} \ No newline at end of file +} diff --git a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHttpProtocolServiceClient.kt b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHttpProtocolServiceClient.kt index 3ab2b4d01b0..978d1649aba 100644 --- a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHttpProtocolServiceClient.kt +++ b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHttpProtocolServiceClient.kt @@ -120,22 +120,24 @@ class AWSHttpProtocolServiceClient( SwiftTypes.String, ) { writer.openBlock("self.init(", ")") { - renderProperties(properties, true) { - when (it.name) { + properties.forEach { property -> + when (property.name) { "region", "signingRegion" -> { - "region" + writer.write("region,") } "awsCredentialIdentityResolver" -> { - "try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver()" + writer.write("try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(),") } "retryStrategyOptions" -> { - "try AWSClientConfigDefaultsProvider.retryStrategyOptions()" + writer.write("try AWSClientConfigDefaultsProvider.retryStrategyOptions(),") } else -> { - it.default?.render(writer) ?: "nil" + writer.write("\$L,", property.default?.render(writer) ?: "nil") } } } + writer.unwrite(",\n") + writer.write("") } } writer.write("") diff --git a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSMiddlewareExecutionGenerator.kt b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSMiddlewareExecutionGenerator.kt index db3b77cc62e..6115b3bddc0 100644 --- a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSMiddlewareExecutionGenerator.kt +++ b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSMiddlewareExecutionGenerator.kt @@ -13,8 +13,9 @@ class AWSMiddlewareExecutionGenerator( private val writer: SwiftWriter, httpBindingResolver: HttpBindingResolver, httpProtocolCustomizable: HTTPProtocolCustomizable, - operationMiddleware: OperationMiddleware, operationStackName: String -): MiddlewareExecutionGenerator( + operationMiddleware: OperationMiddleware, + operationStackName: String +) : MiddlewareExecutionGenerator( ctx, writer, httpBindingResolver, httpProtocolCustomizable, operationMiddleware, operationStackName ) { @@ -25,4 +26,4 @@ class AWSMiddlewareExecutionGenerator( } } } -} \ No newline at end of file +} diff --git a/sdk.properties b/sdk.properties index 7fdde89b7e2..0ecd6cd91c8 100644 --- a/sdk.properties +++ b/sdk.properties @@ -4,4 +4,3 @@ # Use this line to exclude one or more AWS services: # excludeModels=s3,sts,dynamodb -# onlyIncludeModels=dynamodb From 51db47a75a7a257a4a71925365027254f41e8401 Mon Sep 17 00:00:00 2001 From: Josh Elkins Date: Tue, 14 Jan 2025 17:33:34 -0600 Subject: [PATCH 12/19] Fix merge & tests --- .../Endpoints/AWSEndpointConfig.swift | 1 - .../UserAgent/BusinessMetrics.swift | 7 --- .../UserAgent/BusinessMetricsTests.swift | 62 +++++-------------- ...perationEndpointResolverMiddlewareTests.kt | 7 +-- .../AWSRestJson1ProtocolGeneratorTests.kt | 2 - 5 files changed, 17 insertions(+), 62 deletions(-) diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/AWSEndpointConfig.swift b/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/AWSEndpointConfig.swift index 7ba9d598f63..2a2689f6995 100644 --- a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/AWSEndpointConfig.swift +++ b/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/AWSEndpointConfig.swift @@ -28,7 +28,6 @@ public enum AWSEndpointConfig { ).value ?? .preferred } -public enum AWSEndpointConfig { static func configuredEndpoint( sdkID: String, ignoreConfiguredEndpointURLs: Bool?, diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/BusinessMetrics.swift b/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/BusinessMetrics.swift index a1f01c86d50..02d8b06bc34 100644 --- a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/BusinessMetrics.swift +++ b/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/BusinessMetrics.swift @@ -97,7 +97,6 @@ private func setFlagsIntoContext( } } - // Handle S if context.selectedAuthScheme?.schemeID == "aws.auth#sigv4a" { context.businessMetrics = ["SIGV4A_SIGNING": "S"] } @@ -107,12 +106,6 @@ private func setFlagsIntoContext( context.businessMetrics = ["RESOLVED_ACCOUNT_ID": "T"] } - if let endpoint = config.endpoint, !endpoint.isEmpty { - context.businessMetrics = ["ENDPOINT_OVERRIDE": "N"] - } - if context.selectedAuthScheme?.schemeID == "aws.auth#sigv4a" { - context.businessMetrics = ["SIGV4A_SIGNING": "S"] - } switch context.checksum { case .crc32: context.businessMetrics = ["FLEXIBLE_CHECKSUMS_REQ_CRC32": "U"] diff --git a/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/BusinessMetricsTests.swift b/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/BusinessMetricsTests.swift index 851cda828b0..4baa37cb4b0 100644 --- a/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/BusinessMetricsTests.swift +++ b/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/BusinessMetricsTests.swift @@ -22,7 +22,7 @@ class BusinessMetricsTests: XCTestCase { var headers: Headers! override func setUp() async throws { - config = UserAgentValuesFromConfig(appID: nil, endpoint: nil, awsRetryMode: .standard) + config = UserAgentValuesFromConfig(appID: nil, endpoint: nil, awsRetryMode: .standard, requestChecksumCalculation: .whenSupported, responseChecksumValidation: .whenSupported) context = Context(attributes: Attributes()) headers = Headers() } @@ -33,24 +33,10 @@ class BusinessMetricsTests: XCTestCase { context.businessMetrics = ["SHORT_FILLER": "A"] let longMetricValue = String(repeating: "F", count: 1025) context.businessMetrics = ["LONG_FILLER": longMetricValue] + config = UserAgentValuesFromConfig(appID: nil, endpoint: nil, awsRetryMode: .standard, requestChecksumCalculation: .whenRequired, responseChecksumValidation: .whenRequired) - let userAgent = testUserAgent() + let userAgent = createTestUserAgent() -======= - let userAgent = AWSUserAgentMetadata.fromConfigAndContext( - serviceID: "test", - version: "1.0", - config: UserAgentValuesFromConfig( - appID: nil, - endpoint: nil, - awsRetryMode: .standard, - requestChecksumCalculation: .whenRequired, - responseChecksumValidation: .whenRequired - ), - context: context, - headers: headers - ) ->>>>>>> main // Assert values in context match with values assigned to user agent XCTAssertEqual(userAgent.businessMetrics?.features, context.businessMetrics) // Assert string gets truncated successfully @@ -69,26 +55,10 @@ class BusinessMetricsTests: XCTestCase { signingProperties: nil, signer: nil )) -<<<<<<< HEAD - config = UserAgentValuesFromConfig(appID: nil, endpoint: "test-endpoint", awsRetryMode: .adaptive) - let userAgent = testUserAgent() + config = UserAgentValuesFromConfig(appID: nil, endpoint: "test-endpoint", awsRetryMode: .adaptive, requestChecksumCalculation: .whenSupported, responseChecksumValidation: .whenSupported) + let userAgent = createTestUserAgent() -======= - let userAgent = AWSUserAgentMetadata.fromConfigAndContext( - serviceID: "test", - version: "1.0", - config: UserAgentValuesFromConfig( - appID: nil, - endpoint: "test-endpoint", - awsRetryMode: .adaptive, - requestChecksumCalculation: .whenSupported, - responseChecksumValidation: .whenSupported - ), - context: context, - headers: headers - ) ->>>>>>> main // F comes from retry mode being adaptive & N comes from endpoint override let expectedString = "m/A,B,F,N,S,Z,b" XCTAssertEqual(userAgent.businessMetrics?.description, expectedString) @@ -99,20 +69,20 @@ class BusinessMetricsTests: XCTestCase { func test_accountIDInEndpoint_noAccountIDInEndpoint() { configureContext(host: "dynamodb.us-east-1.amazonaws.com", accountID: "0123456789") - let userAgent = testUserAgent() + let userAgent = createTestUserAgent() // E comes from retry mode & T comes from resolving account ID - let expectedString = "m/E,T" + let expectedString = "m/E,T,Z,b" XCTAssertEqual(userAgent.businessMetrics?.description, expectedString) } func test_accountIDInEndpoint_hasAccountIDInEndpoint() { configureContext(host: "0123456789.dynamodb.us-east-1.amazonaws.com", accountID: "0123456789") - let userAgent = testUserAgent() + let userAgent = createTestUserAgent() // E comes from retry mode, O comes from account ID in endpoint, & T comes from resolving account ID - let expectedString = "m/E,O,T" + let expectedString = "m/E,O,T,Z,b" XCTAssertEqual(userAgent.businessMetrics?.description, expectedString) } @@ -121,36 +91,36 @@ class BusinessMetricsTests: XCTestCase { func test_accountIDEndpointMode_recordsPreferredCorrectly() { context.accountIDEndpointMode = .preferred - let userAgent = testUserAgent() + let userAgent = createTestUserAgent() // E comes from retry mode & P comes from preferred account ID endpoint mode - let expectedString = "m/E,P" + let expectedString = "m/E,P,Z,b" XCTAssertEqual(userAgent.businessMetrics?.description, expectedString) } func test_accountIDEndpointMode_recordsDisabledCorrectly() { context.accountIDEndpointMode = .disabled - let userAgent = testUserAgent() + let userAgent = createTestUserAgent() // E comes from retry mode & Q comes from disabled account ID endpoint mode - let expectedString = "m/E,Q" + let expectedString = "m/E,Q,Z,b" XCTAssertEqual(userAgent.businessMetrics?.description, expectedString) } func test_accountIDEndpointMode_recordsRequiredCorrectly() { context.accountIDEndpointMode = .required - let userAgent = testUserAgent() + let userAgent = createTestUserAgent() // E comes from retry mode & R comes from required account ID endpoint mode - let expectedString = "m/E,R" + let expectedString = "m/E,R,Z,b" XCTAssertEqual(userAgent.businessMetrics?.description, expectedString) } // MARK: - Private methods - private func testUserAgent() -> AWSUserAgentMetadata { + private func createTestUserAgent() -> AWSUserAgentMetadata { AWSUserAgentMetadata.fromConfigAndContext( serviceID: "test", version: "1.0", diff --git a/codegen/smithy-aws-swift-codegen/src/test/kotlin/software/amazon/smithy/aws/swift/codegen/OperationEndpointResolverMiddlewareTests.kt b/codegen/smithy-aws-swift-codegen/src/test/kotlin/software/amazon/smithy/aws/swift/codegen/OperationEndpointResolverMiddlewareTests.kt index fe9a171b507..4f4f50bb9d4 100644 --- a/codegen/smithy-aws-swift-codegen/src/test/kotlin/software/amazon/smithy/aws/swift/codegen/OperationEndpointResolverMiddlewareTests.kt +++ b/codegen/smithy-aws-swift-codegen/src/test/kotlin/software/amazon/smithy/aws/swift/codegen/OperationEndpointResolverMiddlewareTests.kt @@ -51,15 +51,10 @@ let projection2: [Swift.String]? = objects2?.compactMap { original in let id = original.id return id } -<<<<<<< HEAD let endpointParamsBlock = { [config] (context: Smithy.Context) in - EndpointParams(boolBar: true, boolBaz: input.fuzz, boolFoo: config.boolFoo, endpoint: config.endpoint, flattenedArray: projection, keysFunctionArray: keys, region: region, stringArrayBar: ["five", "six", "seven"], stringBar: "some value", stringBaz: input.buzz, stringFoo: config.stringFoo, subfield: subfield2, wildcardProjectionArray: projection2) + EndpointParams(boolBar: true, boolBaz: input.fuzz, boolFoo: config.boolFoo, endpoint: configuredEndpoint, flattenedArray: projection, keysFunctionArray: keys, region: region, stringArrayBar: ["five", "six", "seven"], stringBar: "some value", stringBaz: input.buzz, stringFoo: config.stringFoo, subfield: subfield2, wildcardProjectionArray: projection2) } builder.applyEndpoint(AWSClientRuntime.AWSEndpointResolverMiddleware(paramsBlock: endpointParamsBlock, resolverBlock: { [config] in try config.endpointResolver.resolve(params: ${'$'}0) })) -======= -let endpointParams = EndpointParams(boolBar: true, boolBaz: input.fuzz, boolFoo: config.boolFoo, endpoint: configuredEndpoint, flattenedArray: projection, keysFunctionArray: keys, region: region, stringArrayBar: ["five", "six", "seven"], stringBar: "some value", stringBaz: input.buzz, stringFoo: config.stringFoo, subfield: subfield2, wildcardProjectionArray: projection2) -builder.applyEndpoint(AWSClientRuntime.EndpointResolverMiddleware(endpointResolverBlock: { [config] in try config.endpointResolver.resolve(params: ${'$'}0) }, endpointParams: endpointParams)) ->>>>>>> main """ contents.shouldContainOnlyOnce(expected) } diff --git a/codegen/smithy-aws-swift-codegen/src/test/kotlin/software/amazon/smithy/aws/swift/codegen/awsrestjson/AWSRestJson1ProtocolGeneratorTests.kt b/codegen/smithy-aws-swift-codegen/src/test/kotlin/software/amazon/smithy/aws/swift/codegen/awsrestjson/AWSRestJson1ProtocolGeneratorTests.kt index 4448c3c1056..ca370cfd1c2 100644 --- a/codegen/smithy-aws-swift-codegen/src/test/kotlin/software/amazon/smithy/aws/swift/codegen/awsrestjson/AWSRestJson1ProtocolGeneratorTests.kt +++ b/codegen/smithy-aws-swift-codegen/src/test/kotlin/software/amazon/smithy/aws/swift/codegen/awsrestjson/AWSRestJson1ProtocolGeneratorTests.kt @@ -309,8 +309,6 @@ extension ExampleClient { try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, - try AWSClientConfigDefaultsProvider.requestChecksumCalculation(), - try AWSClientConfigDefaultsProvider.responseChecksumValidation(), nil, region, region, From 6eeb569c833cc161c4c1830444d9548f867d8dac Mon Sep 17 00:00:00 2001 From: Josh Elkins Date: Wed, 15 Jan 2025 17:27:38 -0600 Subject: [PATCH 13/19] Changes from code review --- .../Endpoints/Context+ResolvedEndpoint.swift | 21 ---------- .../EndpointResolverMiddleware.swift | 3 -- .../UserAgent/BusinessMetrics.swift | 7 +--- .../UserAgent/BusinessMetricsTests.swift | 22 ---------- .../Context+ResolvedAccountID.swift | 20 ++++++++++ .../codegen/AWSHTTPProtocolClientGenerator.kt | 39 ------------------ .../codegen/AWSHTTPProtocolCustomizations.kt | 2 +- .../AWSHttpProtocolClientGeneratorFactory.kt | 2 +- .../codegen/AWSHttpProtocolServiceClient.kt | 40 ++++++++----------- .../AWSMiddlewareExecutionGenerator.kt | 29 -------------- .../OperationEndpointResolverMiddleware.kt | 2 +- 11 files changed, 41 insertions(+), 146 deletions(-) delete mode 100644 Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/Context+ResolvedEndpoint.swift create mode 100644 Sources/Core/AWSSDKIdentity/Sources/AWSSDKIdentity/Context+ResolvedAccountID.swift delete mode 100644 codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHTTPProtocolClientGenerator.kt delete mode 100644 codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSMiddlewareExecutionGenerator.kt diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/Context+ResolvedEndpoint.swift b/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/Context+ResolvedEndpoint.swift deleted file mode 100644 index 36e5cdae35e..00000000000 --- a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/Context+ResolvedEndpoint.swift +++ /dev/null @@ -1,21 +0,0 @@ -// -// Copyright Amazon.com Inc. or its affiliates. -// All Rights Reserved. -// -// SPDX-License-Identifier: Apache-2.0 -// - -import struct Smithy.Attributes -import struct Smithy.AttributeKey -import class Smithy.Context -import struct SmithyHTTPAPI.Endpoint - -public extension Context { - - var resolvedEndpoint: Endpoint? { - get { get(key: resolvedEndpointKey) } - set { set(key: resolvedEndpointKey, value: newValue) } - } -} - -private let resolvedEndpointKey = AttributeKey(name: "ResolvedEndpoint") diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/EndpointResolverMiddleware.swift b/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/EndpointResolverMiddleware.swift index f15c3631ae1..1576037cab0 100644 --- a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/EndpointResolverMiddleware.swift +++ b/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/EndpointResolverMiddleware.swift @@ -47,9 +47,6 @@ extension AWSEndpointResolverMiddleware: ApplyEndpoint { let endpoint = try resolverBlock(paramsBlock(attributes)) - // Put endpoint into context for use in business metrics - attributes.resolvedEndpoint = endpoint - var signingName: String? var signingAlgorithm: String? var signingRegion: String? diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/BusinessMetrics.swift b/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/BusinessMetrics.swift index 02d8b06bc34..614aa290b96 100644 --- a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/BusinessMetrics.swift +++ b/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/BusinessMetrics.swift @@ -80,11 +80,6 @@ private func setFlagsIntoContext( context.businessMetrics = ["ENDPOINT_OVERRIDE": "N"] } - // Handle O - if let endpoint = context.resolvedEndpoint, let accountID = context.resolvedAWSAccountID, endpoint.host.contains(accountID) { - context.businessMetrics = ["ACCOUNT_ID_ENDPOINT": "O"] - } - // Handle P, Q, R if let accountIDEndpointMode = context.accountIDEndpointMode { switch accountIDEndpointMode { @@ -102,7 +97,7 @@ private func setFlagsIntoContext( } // Handle T - if context.resolvedAWSAccountID != nil { + if context.resolvedAccountID != nil { context.businessMetrics = ["RESOLVED_ACCOUNT_ID": "T"] } diff --git a/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/BusinessMetricsTests.swift b/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/BusinessMetricsTests.swift index 4baa37cb4b0..884cb1e3215 100644 --- a/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/BusinessMetricsTests.swift +++ b/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/BusinessMetricsTests.swift @@ -64,28 +64,6 @@ class BusinessMetricsTests: XCTestCase { XCTAssertEqual(userAgent.businessMetrics?.description, expectedString) } - // MARK: - Account ID in Endpoint - - func test_accountIDInEndpoint_noAccountIDInEndpoint() { - configureContext(host: "dynamodb.us-east-1.amazonaws.com", accountID: "0123456789") - - let userAgent = createTestUserAgent() - - // E comes from retry mode & T comes from resolving account ID - let expectedString = "m/E,T,Z,b" - XCTAssertEqual(userAgent.businessMetrics?.description, expectedString) - } - - func test_accountIDInEndpoint_hasAccountIDInEndpoint() { - configureContext(host: "0123456789.dynamodb.us-east-1.amazonaws.com", accountID: "0123456789") - - let userAgent = createTestUserAgent() - - // E comes from retry mode, O comes from account ID in endpoint, & T comes from resolving account ID - let expectedString = "m/E,O,T,Z,b" - XCTAssertEqual(userAgent.businessMetrics?.description, expectedString) - } - // MARK: - AccountIDEndpointMode func test_accountIDEndpointMode_recordsPreferredCorrectly() { diff --git a/Sources/Core/AWSSDKIdentity/Sources/AWSSDKIdentity/Context+ResolvedAccountID.swift b/Sources/Core/AWSSDKIdentity/Sources/AWSSDKIdentity/Context+ResolvedAccountID.swift new file mode 100644 index 00000000000..11e5f2a286b --- /dev/null +++ b/Sources/Core/AWSSDKIdentity/Sources/AWSSDKIdentity/Context+ResolvedAccountID.swift @@ -0,0 +1,20 @@ +// +// Copyright Amazon.com Inc. or its affiliates. +// All Rights Reserved. +// +// SPDX-License-Identifier: Apache-2.0 +// + +import class Smithy.Context +import struct Smithy.AttributeKey +import struct SmithyIdentity.AWSCredentialIdentity + +public extension Context { + + /// The AWS account ID associated with the selected auth scheme. + /// + /// Will be `nil` if an auth scheme has not yet been selected, an AWS credential identity was not resolved, or the identity did not resolve with an AWS account ID. + var resolvedAccountID: String? { + (selectedAuthScheme?.identity as? AWSCredentialIdentity)?.accountID + } +} diff --git a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHTTPProtocolClientGenerator.kt b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHTTPProtocolClientGenerator.kt deleted file mode 100644 index ffe5ab7b1b5..00000000000 --- a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHTTPProtocolClientGenerator.kt +++ /dev/null @@ -1,39 +0,0 @@ -package software.amazon.smithy.aws.swift.codegen - -import software.amazon.smithy.swift.codegen.SwiftWriter -import software.amazon.smithy.swift.codegen.integration.HTTPProtocolCustomizable -import software.amazon.smithy.swift.codegen.integration.HttpBindingResolver -import software.amazon.smithy.swift.codegen.integration.HttpProtocolClientGenerator -import software.amazon.smithy.swift.codegen.integration.ProtocolGenerator -import software.amazon.smithy.swift.codegen.integration.ServiceConfig -import software.amazon.smithy.swift.codegen.middleware.MiddlewareExecutionGenerator -import software.amazon.smithy.swift.codegen.middleware.OperationMiddleware - -class AWSHTTPProtocolClientGenerator( - private val ctx: ProtocolGenerator.GenerationContext, - private val writer: SwiftWriter, - serviceConfig: ServiceConfig, - private val httpBindingResolver: HttpBindingResolver, - private val defaultContentType: String, - private val httpProtocolCustomizable: HTTPProtocolCustomizable, - private val operationMiddleware: OperationMiddleware -) : HttpProtocolClientGenerator(ctx, writer, serviceConfig, httpBindingResolver, defaultContentType, httpProtocolCustomizable, operationMiddleware) { - - override fun makeMiddlewareExecutionGenerator( - ctx: ProtocolGenerator.GenerationContext, - writer: SwiftWriter, - httpBindingResolver: HttpBindingResolver, - httpProtocolCustomizable: HTTPProtocolCustomizable, - operationMiddleware: OperationMiddleware, - operationStackName: String - ): MiddlewareExecutionGenerator { - return AWSMiddlewareExecutionGenerator( - ctx, - writer, - httpBindingResolver, - httpProtocolCustomizable, - operationMiddleware, - operationStackName - ) - } -} diff --git a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHTTPProtocolCustomizations.kt b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHTTPProtocolCustomizations.kt index ce5b349fe2d..758f4aefa5c 100644 --- a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHTTPProtocolCustomizations.kt +++ b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHTTPProtocolCustomizations.kt @@ -25,8 +25,8 @@ import software.amazon.smithy.swift.codegen.model.isOutputEventStream abstract class AWSHTTPProtocolCustomizations : DefaultHTTPProtocolCustomizations() { override fun renderContextAttributes(ctx: ProtocolGenerator.GenerationContext, writer: SwiftWriter, serviceShape: ServiceShape, op: OperationShape) { - // FIXME handle indentation properly or do swift formatting after the fact + writer.write(" .withAccountIDEndpointMode(value: config.accountIdEndpointMode)") writer.write(" .withIdentityResolver(value: config.awsCredentialIdentityResolver, schemeID: \$S)", "aws.auth#sigv4") writer.write(" .withIdentityResolver(value: config.awsCredentialIdentityResolver, schemeID: \$S)", "aws.auth#sigv4a") writer.write(" .withRegion(value: config.region)") diff --git a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHttpProtocolClientGeneratorFactory.kt b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHttpProtocolClientGeneratorFactory.kt index d33aff5fa91..1cf3aa03b3d 100644 --- a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHttpProtocolClientGeneratorFactory.kt +++ b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHttpProtocolClientGeneratorFactory.kt @@ -24,6 +24,6 @@ class AWSHttpProtocolClientGeneratorFactory : HttpProtocolClientGeneratorFactory operationMiddleware: OperationMiddleware ): HttpProtocolClientGenerator { val config = AWSServiceConfig(writer, ctx) - return AWSHTTPProtocolClientGenerator(ctx, writer, config, httpBindingResolver, defaultContentType, httpProtocolCustomizable, operationMiddleware) + return HttpProtocolClientGenerator(ctx, writer, config, httpBindingResolver, defaultContentType, httpProtocolCustomizable, operationMiddleware) } } diff --git a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHttpProtocolServiceClient.kt b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHttpProtocolServiceClient.kt index 9c736787fdf..300d7c0d7ba 100644 --- a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHttpProtocolServiceClient.kt +++ b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHttpProtocolServiceClient.kt @@ -45,7 +45,7 @@ class AWSHttpProtocolServiceClient( } override fun overrideConfigProperties(properties: List): List { - return properties.map { property -> + return properties.mapNotNull { property -> when (property.name) { "authSchemeResolver" -> { ConfigProperty("authSchemeResolver", SmithyHTTPAuthAPITypes.AuthSchemeResolver, authSchemeResolverDefaultProvider) @@ -101,6 +101,20 @@ class AWSHttpProtocolServiceClient( { it.format("AWSClientConfigDefaultsProvider.httpClientConfiguration()") }, ) } + "accountId" -> null // do not expose accountId as a client config property + "accountIdEndpointMode" -> { // expose accountIdEndpointMode as a Swift string-backed enum + ConfigProperty( + "accountIdEndpointMode", + AWSClientRuntimeTypes.Core.AccountIDEndpointMode.toOptional(), + { writer -> + writer.format( + "\$N.accountIDEndpointMode()", + AWSClientRuntimeTypes.Core.AWSClientConfigDefaultsProvider, + ) + }, + true + ) + } else -> property } } @@ -132,10 +146,10 @@ class AWSHttpProtocolServiceClient( writer.write("try AWSClientConfigDefaultsProvider.retryStrategyOptions(),") } "requestChecksumCalculation" -> { - "try AWSClientConfigDefaultsProvider.requestChecksumCalculation()" + writer.write("try AWSClientConfigDefaultsProvider.requestChecksumCalculation(),") } "responseChecksumValidation" -> { - "try AWSClientConfigDefaultsProvider.responseChecksumValidation()" + writer.write("try AWSClientConfigDefaultsProvider.responseChecksumValidation(),") } else -> { writer.write("\$L,", property.default?.render(writer) ?: "nil") @@ -164,24 +178,4 @@ class AWSHttpProtocolServiceClient( false, false ) - - override fun customizedClientConfigProperty(property: ConfigProperty): ConfigProperty? { - return when (property.name) { - "accountId" -> null // do not expose accountId as a client config property - "accountIdEndpointMode" -> { // expose accountIdEndpointMode as a Swift string-backed enum - ConfigProperty( - "accountIdEndpointMode", - AWSClientRuntimeTypes.Core.AccountIDEndpointMode.toOptional(), - { writer -> - writer.format( - "\$N.accountIDEndpointMode()", - AWSClientRuntimeTypes.Core.AWSClientConfigDefaultsProvider, - ) - }, - true - ) - } - else -> property - } - } } diff --git a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSMiddlewareExecutionGenerator.kt b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSMiddlewareExecutionGenerator.kt deleted file mode 100644 index 6115b3bddc0..00000000000 --- a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSMiddlewareExecutionGenerator.kt +++ /dev/null @@ -1,29 +0,0 @@ -package software.amazon.smithy.aws.swift.codegen - -import software.amazon.smithy.swift.codegen.SwiftWriter -import software.amazon.smithy.swift.codegen.config.ConfigProperty -import software.amazon.smithy.swift.codegen.integration.HTTPProtocolCustomizable -import software.amazon.smithy.swift.codegen.integration.HttpBindingResolver -import software.amazon.smithy.swift.codegen.integration.ProtocolGenerator -import software.amazon.smithy.swift.codegen.middleware.MiddlewareExecutionGenerator -import software.amazon.smithy.swift.codegen.middleware.OperationMiddleware - -class AWSMiddlewareExecutionGenerator( - ctx: ProtocolGenerator.GenerationContext, - private val writer: SwiftWriter, - httpBindingResolver: HttpBindingResolver, - httpProtocolCustomizable: HTTPProtocolCustomizable, - operationMiddleware: OperationMiddleware, - operationStackName: String -) : MiddlewareExecutionGenerator( - ctx, writer, httpBindingResolver, httpProtocolCustomizable, operationMiddleware, operationStackName -) { - - override fun renderConfigPropertyToContext(configProperty: ConfigProperty) { - when (configProperty.name) { - "accountIdEndpointMode" -> { // Used for business metrics - writer.write(" .withAccountIDEndpointMode(value: config.accountIdEndpointMode)") - } - } - } -} diff --git a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/middleware/OperationEndpointResolverMiddleware.kt b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/middleware/OperationEndpointResolverMiddleware.kt index fe830ad20e8..b5e318986d5 100644 --- a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/middleware/OperationEndpointResolverMiddleware.kt +++ b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/middleware/OperationEndpointResolverMiddleware.kt @@ -173,7 +173,7 @@ class OperationEndpointResolverMiddleware( clientContextParam != null -> { when { param.name.toString() == "AccountId" -> { - writer.format("context.resolvedAWSAccountID") + writer.format("context.resolvedAccountID") } param.name.toString() == "AccountIdEndpointMode" -> { "config.accountIdEndpointMode?.rawValue" From 2b6c72603fb1859b0fc244349788a97d488316f0 Mon Sep 17 00:00:00 2001 From: Josh Elkins Date: Wed, 15 Jan 2025 17:35:03 -0600 Subject: [PATCH 14/19] Fix codegen tests --- Package.version.next | 2 +- .../smithy/aws/swift/codegen/PresignerGeneratorTests.kt | 4 ++++ .../codegen/awsrestjson/AWSRestJson1ProtocolGeneratorTests.kt | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Package.version.next b/Package.version.next index 8cfbc905b39..1cc5f657e05 100644 --- a/Package.version.next +++ b/Package.version.next @@ -1 +1 @@ -1.1.1 \ No newline at end of file +1.1.0 \ No newline at end of file diff --git a/codegen/smithy-aws-swift-codegen/src/test/kotlin/software/amazon/smithy/aws/swift/codegen/PresignerGeneratorTests.kt b/codegen/smithy-aws-swift-codegen/src/test/kotlin/software/amazon/smithy/aws/swift/codegen/PresignerGeneratorTests.kt index dcdc896557f..85d0ba5c899 100644 --- a/codegen/smithy-aws-swift-codegen/src/test/kotlin/software/amazon/smithy/aws/swift/codegen/PresignerGeneratorTests.kt +++ b/codegen/smithy-aws-swift-codegen/src/test/kotlin/software/amazon/smithy/aws/swift/codegen/PresignerGeneratorTests.kt @@ -33,6 +33,7 @@ extension GetFooInput { .withIdentityResolver(value: config.bearerTokenIdentityResolver, schemeID: "smithy.api#httpBearerAuth") .withFlowType(value: .PRESIGN_REQUEST) .withExpiration(value: expiration) + .withAccountIDEndpointMode(value: config.accountIdEndpointMode) .withIdentityResolver(value: config.awsCredentialIdentityResolver, schemeID: "aws.auth#sigv4") .withIdentityResolver(value: config.awsCredentialIdentityResolver, schemeID: "aws.auth#sigv4a") .withRegion(value: config.region) @@ -106,6 +107,7 @@ extension PostFooInput { .withIdentityResolver(value: config.bearerTokenIdentityResolver, schemeID: "smithy.api#httpBearerAuth") .withFlowType(value: .PRESIGN_REQUEST) .withExpiration(value: expiration) + .withAccountIDEndpointMode(value: config.accountIdEndpointMode) .withIdentityResolver(value: config.awsCredentialIdentityResolver, schemeID: "aws.auth#sigv4") .withIdentityResolver(value: config.awsCredentialIdentityResolver, schemeID: "aws.auth#sigv4a") .withRegion(value: config.region) @@ -182,6 +184,7 @@ extension PutFooInput { .withIdentityResolver(value: config.bearerTokenIdentityResolver, schemeID: "smithy.api#httpBearerAuth") .withFlowType(value: .PRESIGN_REQUEST) .withExpiration(value: expiration) + .withAccountIDEndpointMode(value: config.accountIdEndpointMode) .withIdentityResolver(value: config.awsCredentialIdentityResolver, schemeID: "aws.auth#sigv4") .withIdentityResolver(value: config.awsCredentialIdentityResolver, schemeID: "aws.auth#sigv4a") .withRegion(value: config.region) @@ -258,6 +261,7 @@ extension PutObjectInput { .withIdentityResolver(value: config.bearerTokenIdentityResolver, schemeID: "smithy.api#httpBearerAuth") .withFlowType(value: .PRESIGN_REQUEST) .withExpiration(value: expiration) + .withAccountIDEndpointMode(value: config.accountIdEndpointMode) .withIdentityResolver(value: config.awsCredentialIdentityResolver, schemeID: "aws.auth#sigv4") .withIdentityResolver(value: config.awsCredentialIdentityResolver, schemeID: "aws.auth#sigv4a") .withRegion(value: config.region) diff --git a/codegen/smithy-aws-swift-codegen/src/test/kotlin/software/amazon/smithy/aws/swift/codegen/awsrestjson/AWSRestJson1ProtocolGeneratorTests.kt b/codegen/smithy-aws-swift-codegen/src/test/kotlin/software/amazon/smithy/aws/swift/codegen/awsrestjson/AWSRestJson1ProtocolGeneratorTests.kt index ca370cfd1c2..4448c3c1056 100644 --- a/codegen/smithy-aws-swift-codegen/src/test/kotlin/software/amazon/smithy/aws/swift/codegen/awsrestjson/AWSRestJson1ProtocolGeneratorTests.kt +++ b/codegen/smithy-aws-swift-codegen/src/test/kotlin/software/amazon/smithy/aws/swift/codegen/awsrestjson/AWSRestJson1ProtocolGeneratorTests.kt @@ -309,6 +309,8 @@ extension ExampleClient { try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), nil, + try AWSClientConfigDefaultsProvider.requestChecksumCalculation(), + try AWSClientConfigDefaultsProvider.responseChecksumValidation(), nil, region, region, From 388ba40f3bac19ed5272e0500bf9d7a427994487 Mon Sep 17 00:00:00 2001 From: Josh Elkins Date: Wed, 15 Jan 2025 18:14:01 -0600 Subject: [PATCH 15/19] Fix tests --- .../AWSClientRuntimeTests/UserAgent/BusinessMetricsTests.swift | 1 - 1 file changed, 1 deletion(-) diff --git a/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/BusinessMetricsTests.swift b/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/BusinessMetricsTests.swift index 884cb1e3215..508f3c12fef 100644 --- a/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/BusinessMetricsTests.swift +++ b/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/BusinessMetricsTests.swift @@ -112,6 +112,5 @@ class BusinessMetricsTests: XCTestCase { let selectedAuthScheme = SelectedAuthScheme(schemeID: "aws.auth#sigv4", identity: AWSCredentialIdentity(accessKey: "abc", secret: "def", accountID: accountID), signingProperties: Attributes(), signer: nil) context.selectedAuthScheme = selectedAuthScheme let uri = URIBuilder().withScheme(.https).withPath("/").withHost(host).build() - context.resolvedEndpoint = Endpoint(uri: uri) } } From b98e583aa9192aa39b561443c89a2f78165a01c9 Mon Sep 17 00:00:00 2001 From: Josh Elkins Date: Wed, 15 Jan 2025 18:14:47 -0600 Subject: [PATCH 16/19] Revert next version --- Package.version.next | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Package.version.next b/Package.version.next index 1cc5f657e05..8cfbc905b39 100644 --- a/Package.version.next +++ b/Package.version.next @@ -1 +1 @@ -1.1.0 \ No newline at end of file +1.1.1 \ No newline at end of file From 6118c4a5fd53afaebef3acecdff9d2d31ab453b1 Mon Sep 17 00:00:00 2001 From: Josh Elkins Date: Thu, 16 Jan 2025 09:30:02 -0600 Subject: [PATCH 17/19] Add accountIDEndpointMode to context only when defined --- .../aws/swift/codegen/AWSHTTPProtocolCustomizations.kt | 6 +++++- .../smithy/aws/swift/codegen/PresignerGeneratorTests.kt | 4 ---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHTTPProtocolCustomizations.kt b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHTTPProtocolCustomizations.kt index 758f4aefa5c..7422da19f86 100644 --- a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHTTPProtocolCustomizations.kt +++ b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHTTPProtocolCustomizations.kt @@ -19,6 +19,7 @@ import software.amazon.smithy.swift.codegen.integration.DefaultHTTPProtocolCusto import software.amazon.smithy.swift.codegen.integration.HttpProtocolServiceClient import software.amazon.smithy.swift.codegen.integration.ProtocolGenerator import software.amazon.smithy.swift.codegen.integration.ServiceConfig +import software.amazon.smithy.swift.codegen.model.getTrait import software.amazon.smithy.swift.codegen.model.isInputEventStream import software.amazon.smithy.swift.codegen.model.isOutputEventStream @@ -26,7 +27,10 @@ abstract class AWSHTTPProtocolCustomizations : DefaultHTTPProtocolCustomizations override fun renderContextAttributes(ctx: ProtocolGenerator.GenerationContext, writer: SwiftWriter, serviceShape: ServiceShape, op: OperationShape) { // FIXME handle indentation properly or do swift formatting after the fact - writer.write(" .withAccountIDEndpointMode(value: config.accountIdEndpointMode)") + val config = AWSServiceConfig(writer, ctx) + if (config.serviceSpecificConfigProperties().any { it.memberName == "accountIdEndpointMode" }) { + writer.write(" .withAccountIDEndpointMode(value: config.accountIdEndpointMode)") + } writer.write(" .withIdentityResolver(value: config.awsCredentialIdentityResolver, schemeID: \$S)", "aws.auth#sigv4") writer.write(" .withIdentityResolver(value: config.awsCredentialIdentityResolver, schemeID: \$S)", "aws.auth#sigv4a") writer.write(" .withRegion(value: config.region)") diff --git a/codegen/smithy-aws-swift-codegen/src/test/kotlin/software/amazon/smithy/aws/swift/codegen/PresignerGeneratorTests.kt b/codegen/smithy-aws-swift-codegen/src/test/kotlin/software/amazon/smithy/aws/swift/codegen/PresignerGeneratorTests.kt index 85d0ba5c899..dcdc896557f 100644 --- a/codegen/smithy-aws-swift-codegen/src/test/kotlin/software/amazon/smithy/aws/swift/codegen/PresignerGeneratorTests.kt +++ b/codegen/smithy-aws-swift-codegen/src/test/kotlin/software/amazon/smithy/aws/swift/codegen/PresignerGeneratorTests.kt @@ -33,7 +33,6 @@ extension GetFooInput { .withIdentityResolver(value: config.bearerTokenIdentityResolver, schemeID: "smithy.api#httpBearerAuth") .withFlowType(value: .PRESIGN_REQUEST) .withExpiration(value: expiration) - .withAccountIDEndpointMode(value: config.accountIdEndpointMode) .withIdentityResolver(value: config.awsCredentialIdentityResolver, schemeID: "aws.auth#sigv4") .withIdentityResolver(value: config.awsCredentialIdentityResolver, schemeID: "aws.auth#sigv4a") .withRegion(value: config.region) @@ -107,7 +106,6 @@ extension PostFooInput { .withIdentityResolver(value: config.bearerTokenIdentityResolver, schemeID: "smithy.api#httpBearerAuth") .withFlowType(value: .PRESIGN_REQUEST) .withExpiration(value: expiration) - .withAccountIDEndpointMode(value: config.accountIdEndpointMode) .withIdentityResolver(value: config.awsCredentialIdentityResolver, schemeID: "aws.auth#sigv4") .withIdentityResolver(value: config.awsCredentialIdentityResolver, schemeID: "aws.auth#sigv4a") .withRegion(value: config.region) @@ -184,7 +182,6 @@ extension PutFooInput { .withIdentityResolver(value: config.bearerTokenIdentityResolver, schemeID: "smithy.api#httpBearerAuth") .withFlowType(value: .PRESIGN_REQUEST) .withExpiration(value: expiration) - .withAccountIDEndpointMode(value: config.accountIdEndpointMode) .withIdentityResolver(value: config.awsCredentialIdentityResolver, schemeID: "aws.auth#sigv4") .withIdentityResolver(value: config.awsCredentialIdentityResolver, schemeID: "aws.auth#sigv4a") .withRegion(value: config.region) @@ -261,7 +258,6 @@ extension PutObjectInput { .withIdentityResolver(value: config.bearerTokenIdentityResolver, schemeID: "smithy.api#httpBearerAuth") .withFlowType(value: .PRESIGN_REQUEST) .withExpiration(value: expiration) - .withAccountIDEndpointMode(value: config.accountIdEndpointMode) .withIdentityResolver(value: config.awsCredentialIdentityResolver, schemeID: "aws.auth#sigv4") .withIdentityResolver(value: config.awsCredentialIdentityResolver, schemeID: "aws.auth#sigv4a") .withRegion(value: config.region) From a9f25a38c88498f04990fa6089cab788bc769bef Mon Sep 17 00:00:00 2001 From: Josh Elkins Date: Thu, 16 Jan 2025 09:37:50 -0600 Subject: [PATCH 18/19] fix ktlint --- .../smithy/aws/swift/codegen/AWSHTTPProtocolCustomizations.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHTTPProtocolCustomizations.kt b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHTTPProtocolCustomizations.kt index 7422da19f86..10c9b58f4bc 100644 --- a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHTTPProtocolCustomizations.kt +++ b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHTTPProtocolCustomizations.kt @@ -19,7 +19,6 @@ import software.amazon.smithy.swift.codegen.integration.DefaultHTTPProtocolCusto import software.amazon.smithy.swift.codegen.integration.HttpProtocolServiceClient import software.amazon.smithy.swift.codegen.integration.ProtocolGenerator import software.amazon.smithy.swift.codegen.integration.ServiceConfig -import software.amazon.smithy.swift.codegen.model.getTrait import software.amazon.smithy.swift.codegen.model.isInputEventStream import software.amazon.smithy.swift.codegen.model.isOutputEventStream From 6367b7ebadb5db8000a44920964d5c56d7068f1c Mon Sep 17 00:00:00 2001 From: Josh Elkins Date: Thu, 16 Jan 2025 15:28:45 -0600 Subject: [PATCH 19/19] Bumping next version to 1.2.0 --- Package.version.next | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Package.version.next b/Package.version.next index 8428158dc5b..867e52437ab 100644 --- a/Package.version.next +++ b/Package.version.next @@ -1 +1 @@ -1.1.2 \ No newline at end of file +1.2.0 \ No newline at end of file